有效的 404 文件未找到错误页面最有用的功能是什么?

发布于 2024-07-07 16:59:28 字数 172 浏览 7 评论 0原文

当用户遇到您网站的 404 文件未找到错误页面时,这很可能不是他们想要的内容。 在这里,您有机会将死胡同变成资源,可以帮助您的访客找到他们想要的任何东西。

如果您要创建完美的 404 文件未找到错误页面,它会做什么? 有效的 404 文件未找到错误页面最有用的功能是什么? 有没有什么强有力的例子?

When a user comes across your site's 404 File Not Found error page, it is most likely not what they were looking for. Here, you have the opportunity to turn a dead end into a resource that can help your visitor find whatever they were looking for.

If you were going to create the perfect 404 File Not Found error page, what would it do? What are the most helpful features of effective 404 File Not Found error pages? Are there any strong examples out there?

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

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

发布评论

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

评论(5

寄居者 2024-07-14 16:59:29
  • 搜索
  • 建议的页面(未找到路径中的单词的搜索结果)
  • 聚合的全球资源或可能是一个简短的站点地图
  • 标签/类别/无论您的导航快捷方式功能
  • 如果结构是层次结构并且未找到的路径位于顶部下方的某个位置级别,请确保将上述内容泰勒化到用户在层次结构中的任何位置(例如 /widgets/some-widget -> 在 /widgets 内搜索、建议的小部件等)。
  • Search
  • Suggested pages (search results for the words in the not-found path)
  • Aggregated global resources or maybe a brief sitemap
  • Tags/categories/whatever your navigation shortcut features
  • If the structure is a hierarchy and the not-found path is somewhere below the top level, make sure to taylor the above to wherever the user is in the hierarchy (eg. /widgets/some-widget -> Search within /widgets, suggested widgets, and so on).
挖个坑埋了你 2024-07-14 16:59:29

我只是让它尽可能轻量级和快速加载,并带有指向站点地图和主页的突出链接。 一旦我意识到我遇到了 404,我通常会跳到后退按钮,或者如果我对我要查找的内容足够感兴趣,就尝试点击网站的主页。 我几乎从未真正阅读过 404 页面上的内容。 也许不是一个好习惯,但我敢打赌大多数网站访问者都和我一样不耐烦。

I would just make it lightweight and fast loading as possible, with prominent links to a site map and the home page. As soon as I realize I've hit a 404, I usually dive for the back button, or just try to hit the home page of the site if I'm interested enough in whatever it is I was looking for. I almost never actually read what was on the 404 page. Maybe not a good habit, but I bet most site visitors are about as impatient as I am.

哑剧 2024-07-14 16:59:29

如果该网站最近进行了重新设计,并且我无法通过重定向阻止 404,我可能会包含一条有关重新设计的简短消息,并提示他们如何在新结构中找到他们想要的内容。

If the site has had a recent redesign, and I couldn't prevent the 404 with redirects, I'd probably include a short message about the redesign, and hints for how they might find what they were looking for in the new structure.

这个俗人 2024-07-14 16:59:29

如果您不厌其烦地维护死链接列表(即您曾经托管的页面的地址,现在已删除/重命名/移动),那么您通常可以向关注某个页面的用户建议正确的页面。来自您网站外部的非常旧的链接。

在某些情况下,您可以提供简短的文本解释来说明为什么该页面不再存在。 或者您可以检测文件路径的一部分,这样您可以一次捕获 100 个不同的死链接。

我已经成功地为一个小型网站完成了这项工作,所以我不知道维护一个较大网站的数据需要多少工作,或者有多个人删除/重命名/移动文件的网站。

If you can be bothered to maintain a list of dead links (i.e. the address of a page you used to host, which is now deleted/renamed/moved) then you will often be able to suggest the correct page to a user who follows a very old link from outside your site.

In some cases you can give a short text explanation to say why that page does not exist any more. Or perhaps you can detect a part of the file path, which allows you to catch 100 different dead links at once.

I have done this sucessfully for a small website, so I don't know how much work it would be maintaining the data for a larger site, or one where there are multiple people deleting/renaming/moving files.

好菇凉咱不稀罕他 2024-07-14 16:59:29

首先,关于曾经有效的死链接,最有效的 404 实际上是 301 永久重定向到新 URL。 任何网站重新设计都应将旧 URL 映射到新 URL,并且任何允许用户编辑页面 URL 的 CMS 都应在 URL 更改时自动进行设置。

否则,一个好的解决方案是根据 URL 组成部分中存在的关键字向用户展示您网站的搜索结果。

这些是通用解决方案,但我确信您可以为您的站点/网络应用程序提出自己的特定解决方案,例如 wiki 风格的站点可以显示一个空的可编辑页面,以允许用户在该 URL 创建页面。

First of all regarding dead links, which were at one time valid, the most effective 404 is actually a 301 permanent redirect to the new URL. Any site redesign should map old urls to new ones, and any CMS that allows the user to edit page URLs should automatically set this up when the URL changes.

Otherwise a good solution is to present the user with search results from your site, based on the keywords present in the components of the URL.

These are the generic solutions, but I'm sure you can come up with your own specific solutions for your site/webapp, e.g. a wiki style site could display an empty editable page to allow the user to create a page at that URL.

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