友好的 HTTP 401 状态代码消息?

发布于 2024-07-06 16:15:55 字数 150 浏览 12 评论 0原文

我是一名开发人员,而不是文字大师,因此我陷入了困境。

我们有一个基于订阅的网站,用户很可能会看到我们的 401 页面。

我们决定需要替换 IIS 401;2 页面。

有没有人有关于编写良好的非攻击性 401 页面的示例或建议?

I'm a developer not a wordsmith and as such I'm stuck.

We have a subscription based site whereby users may well come across our 401 page.

We've decided that the IIS 401;2 page needs replacing.

Does anyone have any examples or advise about writing a good non offensive 401 page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

在巴黎塔顶看东京樱花 2024-07-13 16:15:55

这是一个真实的例子 - 而且是一个非常有趣的例子 - 据称取自 michaelbloomberg.com

未经授权 (401)

通过一系列高度
精密而复杂的算法,
本系统已确定您
目前无权使用
这个系统功能。 可能是这样
您只是输错了密码,或者
可能你是某种
没有任何行星的外星人
手,因此无法打字。 如果我
如果是赌徒,我敢打赌那是一只猫
(一只名叫 Sierra 的橙色虎斑猫或
哈雷)以某种方式跳到你的
键盘,忘记了更多的一些
来自打字者的重要指示
您付费的课程。 基于
遇到实际错误,我会
猜猜有问题的猫科动物
只是忘记放置一个或两个
将爪子放在适当的主页键上
在开始之前。 话又说回来,我想
这可能是键盘错误
由某种形式的宇宙造成的
辐射; 这很适合
我的星际外星人理论
如果您认为这可能是原因,
也许你可以创建某种
地下掩体帮助盾
你自己从中。 我不知道它
会起作用,但是,你可能会觉得
如果你尝试一些事情会更好。

别让我开始了解那些很酷的 404 页面......

This is an actual example - and a really funny one - supposedly taken from michaelbloomberg.com

Unauthorized (401)

Through a series of highly
sophisticated and complex algorithms,
this system has determined that you
are not presently authorized to use
this system function. It could be that
you simply mistyped a password, or, it
could be that you are some sort of
interplanetary alien-being that has no
hands and, thus, cannot type. If I
were a gambler, I would bet that a cat
(an orange tabby named Sierra or
Harley) somehow jumped onto your
keyboard and forgot some of the more
important pointers from those typing
lessons you paid for. Based on the
actual error encountered, I would
guess that the feline in question
simply forgot to place one or both
paws on the appropriate home keys
before starting. Then again, I suppose
it could have been a keyboard error
caused by some form of cosmic
radiation; this would fit nicely with
my interplanetary alien-being theory.
If you think this might be the cause,
perhaps you could create some sort of
underground bunker to help shield
yourself from it. I don't know that it
will work, but, you will probably feel
better if you try something.

And don't get me started on all the cool 404 pages out there....

会发光的星星闪亮亮i 2024-07-13 16:15:55

我必须刷新我的记忆才能看到 HTTP 错误 401 -未经授权 正是...

所以基本上,如果您未获得授权(没有订阅)或无法进行身份验证(用户名/密码错误),您可能会收到此错误。 加上其他一些极端情况。

也许是这样的:
“很抱歉,我们无法验证您的身份。您必须订阅才能访问这些页面。如果您已经订阅,请检查您在登录步骤中提供了正确的凭据。”

当然,只是用正确的英语(我是法国人),也许还有更多细节(如果忘记密码该怎么办等)。 以及指向网站公共部分和登录页面的链接。

I had to refresh my memory to see what HTTP Error 401 - Unauthorized was exactly...

So bascially you can get this error if you are not authorized (no subscription) or failed to authenticate (wrong username/password). Plus some other corner cases.

Perhaps something like:
"We are sorry but we are not able to authenticate you. You have to subscribe to access these pages. If you are already subscribed, check you gave proper credential in the login step."

Just in proper English, of course (I am French), perhaps with more details (what to do if you forget your password, etc.). And a link to the public part of the site, and to the login page.

云巢 2024-07-13 16:15:55

虽然晚了 9 年,但也许这可以帮助别人。 我为我的网站想出的一个是

在此处输入图像描述

Only 9 years late, but maybe this could help someone out. The one I came up with for my website was,

enter image description here

多彩岁月 2024-07-13 16:15:55

可以肯定的是,Don Norman 和 Jakob Nielsen 的人机交互设计原则对于网页设计和 401 页面仍然有效。

401 页面仍然是一个网页,主要区别是用户更加困惑/沮丧。

以下是设计原则:

  • 可见性 - 用户能否看到这是一个 401 页面并且他/她是否理解
  • 反馈 - 用户是否理解正在发生的事情
  • 可供性 - 用户是否理解可点击的内容以及如何处理界面
  • 映射 -用户是否知道点击哪里可以从 401
  • 约束中恢复 - 限制用户拥有的自由,使他/她更容易认知处理。
  • 一致性和标准 - 使用您网站中其他地方使用的相同标准

关于此问题的一个非常好的免费资源是 美国政府的可用性指南手册

It is a safe bet that Don Norman's and Jakob Nielsen's principles for Human Computer Interaction design is still valid for web design and 401 pages.

The 401 pages is still a web-page, the main difference is a slightly more confused/frustrated user.

Here is the design principles:

  • Visibility - Can the user see that it is a 401 page and does he/she understand
  • Feedback - Does the user understand what is happening
  • Affordance - Does the user understand whats clickable and what to do with your interface
  • Mapping - Does the user understand where to click to recover from the 401
  • Constraint - limit the freedom the user have, to make it more cognitive easy for him/her to process.
  • Consistency and standards - use the same standard that you used every where else in your website

A very good and free resource on this issue, is the Usability Guidelines Book from the US government.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文