404 Error Pages: Reloaded(404错误页面:非常棒的)

本文介绍了超过40个友好、创意且突出的404错误页面实例,这些页面不仅帮助用户找到正确的路径,还提供了丰富的用户体验,如诗歌、漫画等元素。

from:http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/

e文水平有限,如果可以请尽量参考英文或直接查看原文

by clin003 at 20070822 from:http://clin003.com或http://blog.youkuaiyun.com/clin003/

Three weeks ago we’ve showcased some of the most beautiful, creative and user-friendly 404 Error Pages; we’ve collected some interesting ideas one can use to help out the visitors once they got lost ony your page. We’ve also asked our readers to design their own 404 pages and promised to present the best solutions afterwards.

三个星期前,我们已经展示了一些最漂亮的,有创意和易用的404错误页面;我们已经收集了一些有趣的想法,可以用来帮助那些在网页上丢失的游客.我们也要求我们的读者来设计自己的404页,并许诺将是目前最好的解决方法.

We’ve received over 100 entries. The choice wasn’t easy, so evaluating the quality of the entries we’ve considered - among other things - the communication with visitors, precise and clear navigation, the use of graphics, creative ideas and some outstanding solutions. Some of the solutions presented below might not be as helpful as they could or should be, however they include some creative approaches you should be aware of designing your 404 error pages.

我们已经收到100多份作品.选择不容易,在作品质量审核方面,我们考虑到:沟通,准确和清晰的导航,使用图形,创意,并有优秀的解决方案. 下面有些有些作品的解决办法未必有用,但也被包含进来是因为他们当中也包括一些创造性的办法,你应该意识到你的设计中的404错误页面.

by clin003 at 20070822 from:http://clin003.com或http://blog.youkuaiyun.com/clin003/

We’d like to thank to everyone who participated, your input means a lot for us and for web-designers worldwide. You help to improve the quality of the Web. Don’t underestimate it.

我们想感谢每一位参加者,您的参与意味着很多,在全世界,对于我们和网站设计者们.在您的帮助下,web质量将得以提高.不要低估它的力量!

So here is what you’ve come out with: over 40 working examples of user-friendly, creative and outstanding 404 error pages - in a brief overview.

这里这些使我们精心挑选出的: 40多个有好的,有创意和优秀的404错误页面实例.

1. Appealing images

A really dirty, hand-made image with a comment - for despaired visitors only. The page also includes a search box.

1 .呼吁图像

肮脏,自制的形象与毫不客气的留笔(我已经犯拉一个错误,请离开这里吧)-对于绝望的游客而已.该网页还包括一个搜索框.



Rainfall Daffinson makes sure you don’t feel lost.
Rainfall Daffinson 使你不会感到失落.
by clin003 at 20070822 from:http://clin003.com或http://blog.youkuaiyun.com/clin003/


Even a 404-error page can look stylish.
看起来很时尚


A book with the page which couldn’t be found.
书中找不到的一页






Jamie Huskisson communicates with “lost” visitors using imagery.
Jamie Huskisson 通过视觉的意象与游客沟通.


404 error as time on a clock.
就像钟表上的时间


Sometimes you can feel or even smell that you’re definitely not on the page you wanted to visit.
有时候你感觉到或闻到:你绝不是在访问想要访问的页面


2. Getting poetic

404 error haiku. Informative, however a direct link to the start page would be quite useful.

2. 诗意

404错误haiku.详实,但它直接链接到首页,将是非常有益的.(这里的haiku我不知道能不能翻译为启示语或FAQ)


Three more haikus by Lumino.us. Plus beer to keep you company.
三句写自Lumino.us的haikus,嘿嘿,还有啤酒陪


And one more haiku by alt-web.com.


BlueVertigo offers a poem with horizontal scrolling.
BlueVertigo提供啦一首横向放置的诗



A small poem about the 404 error by Poemofquotes.com
Poemofquotes.com一首关于404错误的小诗


Jacob Thomas quotes Winston Churchill and informs lost visitors that the page they’ve been looking for seems to have been burnt down by a puckish elf called ‘Prontyr’.
Jacob Thomas引用Winston Churchill的话告知游客遗失该网页,他们一直在寻找的网页似乎已被烧毁啦



Darren Hoyt appeals to the humanity of mistakes and errors and communication with visitors directly.
Darren Hoyt呼吁人性化的直接的与游客沟通.




3. Communicate through emotions

Isn’t he sad…

3. 情绪(感情)

是不是他的悲哀…



…however, Cat Content seems to be doing well…
…无论怎样,剪切内容看起来是正常的…


…and Krystal gets no biscuit.

krystal并没有得到biscuit.

-------------------------------------------------------------------
下边的先不翻译啦,先整理好有空接着翻译
-------------------------------------------------------------------

4. Communicate through irony

Maybe an idiot has passed you the wrong link or maybe a bigger idiot has linked in their site to a page that doesn’t exist. In both cases the big boss man has been sent an email informing him of this problem, so the person responsible can be tied to a tree and horsewhipped! Nice to know.

4. 讽刺

也许白痴已经过错误连接,或者一个大白痴还挂在不存在的网站页面上.在这两种情形下大Boss已发出一封电子邮件,通知他这个问题,so the person responsible can be tied to a tree and horsewhipped! Nice to know.

Martin Yelland has some good explanations about what happened: strange little Web Gremlins or fluctuations of the Earth’s Magnetic field might have caused the error - however, a team of highly trained monkeys has been dispatched to deal with this situation.

Martin Yelland已经对已经发生的事情有过一个很好的解释:一个小网站定制或者地球磁场波动或许发生啦错误,无论怎样,一个训练有素的猴子小分队已经被派出处理这一局面.
by clin003 at 20070822 from:http://clin003.com或http://blog.youkuaiyun.com/clin003/


Even although you’re a douche bag, you can use a search box to get to the page you’ve been looking for.

就算你是个呆瓜,你可以使用搜索框寻找你想要的页面。


Apparently, this is a test of the emergency broadcast systems. You should remain calm, these kinds of things happen all the time. The “four oh four error” by Poropoptrt.com.

显然,这是紧急广播系统的一个测试.你要在这类事情发生的全过程中保持冷静,. "404错误" by poropoptrt.com .



5. While you are lost…

…you can read a comic…

5. 虽然你失去啦…

…你可以看一个漫画…



…or more comics (the image is changing after every reload)…

…或者更多的漫画(美刷新一次图片都会变)…


…get two cocktail recipes…

…获得两个cocktail食谱…


…死…


…don’t count to 404 (the site also provides a search box and a tag cloud)…

不要计算404(网站还提供了一个搜索框和标签云图)



6. Explain what happened.

Explanation in a well-designed visualization of what happened.

6. 解释发生啦什么.

解释在一个良好的环境中发生啦什么.


Be aware when you’ve reached a buzzless page…

要知道你已经达到啦buzzless page



7. Explain what can be done.

7.解释可以做些什么.



Foobr offers a detailed explanation on what can be done and what the “lost” visitor might be looking for.

对于游客正在寻找的丢失内容,foobr提供啦详细的关于什么可以做的解释



3amproductions.net suggests pages the visitor might be looking for.
3amproductions.net 对游客正在寻找的内容的建议



Renet-web.met offers recent posts and a search box.
Renet-web提供最近提交的和一个搜索框


8. Unusual solutions.

Shocking visitors with colors - interesting, but not quite appealing…

8. 不寻常的解决方案.

Shocking visitors with colors - interesting, but not quite appealing…

震惊游客的色调-有趣但不相当好



Blue Screen Of Death on the Web.
网络上的死机(模仿经典win98死机界面)


Sorabji.com lists what people were looking for when they got the 404 Page Error. Interesting approach, however not recommendable - think of spambots.

sorabji.com做出啦当人们正在寻找什么的时候遇到404错误的时候的这样一个列表.有趣的方法,但是不值得推荐-think of spambots.


9. Be sincere.

Jeremy seems to be really sorry about the missing page…

9. 虔诚的办法.

Jeremy 看起来对这样的错误感到真的对不起…


…so is Rainer…


10. Do whatever you want to do.

This is not a working example, since the site isn’t using the page as a working 404 error page. Nevertheless it’s quite funny: the characters are talking, and as you might suggest, they are talking about 404 errors!

by clin003 at 20070822 from:http://clin003.com或http://blog.youkuaiyun.com/clin003/

10. 做你想做的吧.

This is not a working example, since the site isn’t using the page as a working 404 error page. Nevertheless it’s quite funny: the characters are talking, and as you might suggest, they are talking about 404 errors!

这并不是一个样例,因为网站是不使用网页作为工作的404错误页面.尽管如此,它相当有趣:那些文字在交谈,你可能会认为,他们所谈论的正是404错误页面!


<template> <div class="web-view-container"> <view class="nav-bar"> <up-navbar title="在线咨询" bgColor="#165DFF"></up-navbar> </view> <web-view :src="webViewUrl" id="consultingWebView"></web-view> </div> </template> <script setup> import { ref } from "vue"; import { onLoad } from "@dcloudio/uni-app"; const webViewUrl = ref(""); onLoad(() => { webViewUrl.value = uni.getStorageSync("consultingUrl") || ""; uni.removeStorageSync("consultingUrl"); // 延迟注入UEM配置和视口修正代码 setTimeout(() => { // // 使用uni.getSystemInfoSync()替代uni.env.platform获取平台信息 // const isH5 = uni.getSystemInfoSync().platform === "h5"; const injectScript = ` // 配置UEM的S码(请替换为实际S码) // 配置UEM的S码(已设置为实际值S02086) // UEM完整配置(按文档要求格式) window.uemConfig = { sCode: 'S02086', version: '1.0.0', timestamp: new Date().getTime(), environment: process.env.NODE_ENV || 'production' }; console.log('[UEM配置] 完整配置:', window.uemConfig); // 多重验证机制 const configValid = window.uemConfig && window.uemConfig.sCode === 'S02086'; if (!configValid) { console.error('[UEM配置] 严重错误:S码配置验证失败', window.uemConfig); // 尝试从localStorage恢复 const stored = localStorage.getItem('uemConfig'); if (stored) { window.uemConfig = JSON.parse(stored); console.log('[UEM配置] 已从localStorage恢复:', window.uemConfig); } } else { console.log('[UEM配置] S码验证成功'); localStorage.setItem('uemConfig', JSON.stringify(window.uemConfig)); sessionStorage.setItem('uemConfig', JSON.stringify(window.uemConfig)); } // 修正视口设置 const meta = document.querySelector('meta[name=viewport]') || document.createElement('meta'); meta.name = 'viewport'; meta.content = 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'; if (!document.querySelector('meta[name=viewport]')) { document.head.appendChild(meta); } `; // 统一平台判断逻辑 const systemInfo = uni.getSystemInfoSync(); const isH5 = typeof window !== 'undefined' && systemInfo.platform === 'h5'; if (isH5) { // H5环境下使用iframe注入脚本 // 增加延迟确保web-view完全加载 // 增强的web-view加载检测与注入机制 let webView = null; let injectionAttempts = 0; const maxAttempts = 8; const initialDelay = 500; const backoffFactor = 1.5; const fullConfig = { sCode: 'S02086', version: '1.0.0', timestamp: new Date().getTime(), environment: typeof window !== 'undefined' ? 'h5' : 'other' }; // 配置日志工具 const logWithTime = (message) => { const time = new Date().toISOString().split('T')[1].slice(0, 11); console.log(`[${time}][UEM注入]`, message); }; // 核心注入函数 const injectConfig = (targetWindow) => { try { // 清除旧配置 targetWindow.uemConfig = null; // 设置新配置 targetWindow.uemConfig = { ...fullConfig, attempt: injectionAttempts }; logWithTime(`配置已设置: ${JSON.stringify(targetWindow.uemConfig)}`); // 验证配置 if (targetWindow.uemConfig?.sCode !== 'S02086') { throw new Error(`配置验证失败: ${targetWindow.uemConfig?.sCode || '未设置'}`); } // 初始化UEM if (targetWindow.uem && typeof targetWindow.uem.init === 'function') { logWithTime('调用UEM.init()'); const startTime = performance.now(); const result = targetWindow.uem.init(); const duration = performance.now() - startTime; logWithTime(`UEM初始化完成 (${duration.toFixed(2)}ms): ${JSON.stringify(result)}`); return true; } else { logWithTime('UEM对象不存在,创建增强模拟对象'); targetWindow.uem = targetWindow.uem || {}; targetWindow.uem.init = function() { logWithTime('[模拟UEM] 初始化完成'); return { success: true, sCode: fullConfig.sCode, timestamp: Date.now() }; }; targetWindow.uem.getConfig = function() { return targetWindow.uemConfig; }; const result = targetWindow.uem.init(); logWithTime(`模拟UEM初始化结果: ${JSON.stringify(result)}`); return true; } } catch (e) { logWithTime(`注入失败: ${e.message}`); return false; } }; // 多路径注入策略 const attemptInjection = () => { injectionAttempts++; const currentDelay = initialDelay * Math.pow(backoffFactor, injectionAttempts - 1); logWithTime(`第${injectionAttempts}次尝试 (延迟${currentDelay.toFixed(0)}ms)`); // 尝试获取web-view元素 webView = document.querySelector('#consultingWebView'); let injectionSuccess = false; // 路径1: 通过web-view的contentWindow注入 (带postMessage备选) if (webView) { logWithTime(`web-view状态: ${webView.tagName}#${webView.id}, src=${webView.src.substring(0, 50)}`); try { // 检查contentWindow是否可访问 if (webView.contentWindow) { logWithTime('尝试通过contentWindow注入'); injectionSuccess = injectConfig(webView.contentWindow); if (!injectionSuccess) { // 尝试使用postMessage logWithTime('contentWindow注入失败,尝试postMessage'); webView.contentWindow.postMessage({ type: 'UEM_CONFIG_INJECTION', config: fullConfig }, '*'); injectionSuccess = true; // 标记为成功发送,但实际成功需要确认 } } else { logWithTime('web-view.contentWindow不可用'); } } catch (e) { logWithTime(`web-view注入异常: ${e.message}`); } } else { logWithTime('未找到web-view元素'); } // 路径2: 如果web-view注入失败,尝试直接在当前窗口注入 if (!injectionSuccess && typeof window !== 'undefined') { logWithTime('尝试直接在当前窗口注入'); injectionSuccess = injectConfig(window); } // 路径3: 创建iframe动态注入 if (!injectionSuccess) { logWithTime('尝试通过临时iframe注入'); const tempIframe = document.createElement('iframe'); tempIframe.style.display = 'none'; document.body.appendChild(tempIframe); try { if (tempIframe.contentWindow) { injectionSuccess = injectConfig(tempIframe.contentWindow); if (injectionSuccess) { logWithTime('iframe注入成功,复制配置回主窗口'); window.uemConfig = tempIframe.contentWindow.uemConfig; window.uem = tempIframe.contentWindow.uem; } } } catch (e) { logWithTime(`iframe注入异常: ${e.message}`); } finally { document.body.removeChild(tempIframe); } } // 结果处理与重试逻辑 if (injectionSuccess) { logWithTime('配置注入成功!'); localStorage.setItem('uemConfig', JSON.stringify(fullConfig)); sessionStorage.setItem('uemConfig', JSON.stringify(fullConfig)); // 发送成功事件 window.dispatchEvent(new CustomEvent('uemInjectionSuccess', { detail: fullConfig })); return true; } else if (injectionAttempts < maxAttempts) { logWithTime(`注入失败,${currentDelay.toFixed(0)}ms后重试`); setTimeout(attemptInjection, currentDelay); } else { logWithTime('所有注入尝试均已失败'); // 最后的应急措施 window.uemConfig = fullConfig; window.uem = { init: () => { const result = { success: true, sCode: fullConfig.sCode, emergency: true }; logWithTime(`[应急模式] UEM初始化: ${JSON.stringify(result)}`); return result; }, getConfig: () => window.uemConfig }; // 显示用户通知 uni.showModal({ title: '初始化提示', content: '聊天功能已启用基础模式,部分功能可能受限。如遇问题,请刷新页面重试。', showCancel: false }); return false; } }; // 设置web-view加载完成监听器 const setupWebViewListener = () => { const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (!webView) { webView = document.querySelector('#consultingWebView'); if (webView) { logWithTime('检测到web-view元素,开始注入流程'); observer.disconnect(); // 立即开始第一次尝试 attemptInjection(); } } }); }); // 观察body变化以检测web-view出现 observer.observe(document.body, { childList: true, subtree: true }); // 超时后备 - 如果10秒内未检测到web-view setTimeout(() => { if (!webView) { observer.disconnect(); logWithTime('web-view元素未检测到,启动后备注入流程'); attemptInjection(); } }, 10000); }; // 启动web-view检测 setupWebViewListener(); // 添加全局消息监听器处理web-view响应 window.addEventListener('message', (event) => { if (event.data.type === 'UEM_CONFIG_ACK') { logWithTime(`收到web-view确认: ${event.data.status}`); if (event.data.status === 'success') { localStorage.setItem('uemConfig', JSON.stringify(fullConfig)); sessionStorage.setItem('uemConfig', JSON.stringify(fullConfig)); } } }); } else if (typeof uni.createWebViewContext !== 'undefined') { // 非H5环境且API存在时使用 console.log('非H5环境注入脚本:', injectScript); uni.createWebViewContext('consultingWebView').evaluateJavaScript(injectScript); } else { // API不存在时显示错误并尝试备选方案 console.error('当前环境不支持uni.createWebViewContext,尝试直接执行脚本'); // 备选方案:直接在当前上下文执行脚本 try { // 强制重置并设置UEM配置 window.uemConfig = { sCode: 'S02086' }; console.log('[备选方案] 强制设置S码:', window.uemConfig.sCode); // 从localStorage读取配置确保一致性 const storedConfig = localStorage.getItem('uemConfig'); if (storedConfig) { window.uemConfig = JSON.parse(storedConfig); console.log('[备选方案] 从localStorage恢复配置:', window.uemConfig); } // 执行UEM初始化文档要求的代码 if (typeof window.uem === 'undefined') { console.log('[备选方案] UEM对象不存在,创建模拟对象'); window.uem = { init: function() { console.log('[备选方案] UEM初始化模拟成功'); // 模拟UEM初始化检查 if (window.uemConfig?.sCode === 'S02086') { console.log('[备选方案] UEM配置验证通过'); } else { console.error('[备选方案] UEM配置验证失败'); } } }; } if (window.uem && typeof window.uem.init === 'function') { console.log('[备选方案] 执行UEM初始化'); window.uem.init(); console.log('[备选方案] UEM初始化完成'); } else { console.error('[备选方案] UEM初始化函数不存在,执行终极备选方案'); // 终极备选:直接调用UEM可能使用的全局配置方法 if (window.configureUEM) { console.log('[备选方案] 调用window.configureUEM'); window.configureUEM({ sCode: 'S02086' }); } else { console.error('[备选方案] 所有配置方法均失败,尝试终极解决方案'); // 终极解决方案:动态创建UEM脚本 const uemScript = document.createElement('script'); uemScript.textContent = ` window.uemConfig = ${JSON.stringify(window.uemConfig)}; console.log('[动态脚本] UEM配置已设置:', window.uemConfig); if (!window.uem) window.uem = {}; window.uem.init = function() { console.log('[动态脚本] UEM初始化完成'); return { success: true, sCode: window.uemConfig.sCode }; }; window.uem.init(); `; document.head.appendChild(uemScript); console.log('[备选方案] 动态UEM脚本已注入'); } } } catch (e) { console.error('备选方案执行失败:', e); } } }, 2000); // 延长延迟确保页面加载完成 }); </script> <style lang="scss" scoped> :deep(.u-navbar__content__left) { display: none; } .web-view-container { position: fixed; top: 0; left: 0; width: 100%; height: 90%; z-index: 9999; } .nav-bar { height: 44px; display: flex; align-items: center; padding: 0 16px; background-color: #fff; border-bottom: 1px solid #eee; } .title { margin-left: 16px; font-size: 16px; font-weight: 500; } </style> const handleTabClick = (item) => { if (item.id === 2) { const url = "https://nesp.haier.net/webchatbot-new/#/h5chat?sysNum=1659675658214&sourceId=744&lang=zh_CN&userId=a94e6e99fd72b81eea697c5c90c99e2fc651a3670574652a8e20a9a0142ba9b0f1efb0f543c5603cf2d45532de3263759359e06f44d347942fbb95028d5ccd9f#reloaded"; uni.setStorageSync("consultingUrl", url); uni.navigateTo({ url: "/pages/consulting/index" }); return; } };这个页面中,需要嵌入一个外部的功能页,功能页中需要chat功能,嵌入后页面单点登录但是chat功能不能使用,并且报当前环境不支持uni.createWebViewContext,尝试直接执行脚本,应该怎么改
08-16
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值