您认为渐进增强有多重要?
渐进增强是一种 Web 开发方法,不仅允许更大的可移植性和可访问性,而且在我看来,使开发过程更加容易。
我想知道社区其他人对这种方法的看法。
特别是:您认为 Web 应用程序应该支持的最低限度的技术是什么?
Progressive Enhancement is a web development methodology that not only allows greater portability and accessibility but in my opinion, makes the development process easier.
What I want is to know what the rest of the community think of this approach.
In particular: What do you believe is the minimum set of technologies that a web application should support?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果它在纯文本浏览器(当然没有 CSS 和 Javascript)以及屏幕阅读器中仍然可用,那么您就走在正确的道路上。 但这些是您会发现的最高标准:)
If it remains usable in a text-only browser (without CSS and Javascript, of course) and also in a screen-reader, you're on the right track. But these are about the highest standards that you'll find :)
我个人默认情况下会阻止引荐来源网址、cookie 和 JavaScript,并在各个站点上临时或永久地重新启用它们。
我会原谅某个网站在没有 cookie 的情况下无法为登录用户工作,但是,当它们在没有 JavaScript 的情况下无法工作(如果它被用于琐碎的目的)时,我会感到非常沮丧。
最低要求:具有基本结构元素的 HTML + 链接、HTML 表单 + 可能是应用程序的 cookie。
网站可以在 vt100、“普通”浏览器、电话、屏幕阅读器中运行...
-z
I personally block referrers, cookies and JavaScript by default and re-enable them temporarily or permanently on a site-by-site basis.
I'll forgive a web site for not working without cookies for signed-in users, however I get quite upset when they won't work without JavaScript if it's being used for trivial purposes.
Minimum requirements: HTML with basic structural elements + links, HTML forms + maybe cookies for applications.
Site could be run in a vt100, a "normal" browser, a phone, a screen reader...
-z
我会很乐意以 HTML4 和 CSS2 为目标,并将使用屏幕阅读器构建的基本内容作为大多数网站的基准体验。 关键是要记住适用于基于文本的浏览器和屏幕阅读器的布局,并将其用作增强页面的基础。
I would feel comfortable targeting HTML4 and CSS2, with the basic content structured with screenreaders in mind as a baseline experience for most websites. The key is to keep in mind a layout that is functional for text-based browsers and screenreaders and use that as the basis for the enhanced page.
开发一个 100% 有用的网站,无需 css、javascript 等,然后为 javascript 用户添加所有漂亮/奇特的东西,这就是渐进增强的一个例子。
然而,当您使用 fancy/pretty 编写站点,然后返回并关闭 javascript 和 css 以查看其外观时,这就是优雅的降级。
你首先关注的群体真正决定了这一点。 您有可能得出相同的结论,但可能性不大。 你的专注真正决定了终点。
Developing a site that is 100% useful without css, javascript, etc. and then adding all the pretty/fancy stuff for javascript users is an example of Progressive Enhancement.
However, when you code the site with fancy/pretty and then go back and turn off javascript and css to see how it looks, that is graceful degradation.
The group you focus on first really decides this. It is possible that you could arrive at the same conclusion but it is unlikely. Your focus determines the ending point really.
那么“渐进增强”只是“优雅降级”的另一个术语?
在这种情况下,所有网站都应该采用这种方式。
Web 应用程序应使用 HTML(4 或更高版本)构建,在语义上并符合标准。
所有 CSS 都应该是可选的 - 内容和内容 表单在没有它的情况下应该可以工作,但有了它看起来更漂亮。
所有 JavaScript 都应该是可选的 - 页面和页面 表单不需要它就可以工作,但是使用它可以更轻松地工作。
所有代码都应根据标准和规范编写 检查每个主要渲染引擎 - 但除非绝对必要,否则不要解决浏览器中的缺陷; 浏览器应该尊重标准,而不是开发人员屈服于糟糕的渲染引擎。
So "Progressive Enhancement" is just another term for "Graceful Degradation"?
In which case, it's the way all websites should be done.
Web Apps should be built in HTML (4 or later), semantically and against the standards.
All CSS should be optional - content & forms should work without it, but look prettier with it.
All JavaScript should be optional - pages & forms should work without, but work easier with it.
All code should be written according to the standards & checked in each major rendering engine - but don't work around flaws in browsers unless absolutely necessary; it's up to the browsers to respect standards, not developers to grovel after bad rendering engines.