What is Progressive Enhancement?

后端 未结 8 1240
醉话见心
醉话见心 2020-12-03 04:52

Jeff mentioned the concept of \'Progressive Enhancement\' when talking about using JQuery to write stackoverflow.

After a quick Google, I found a couple of high-leve

相关标签:
8条回答
  • 2020-12-03 05:18

    See also Unobtrusive Javascript which is the bedrock progressive enhancement is built.

    0 讨论(0)
  • 2020-12-03 05:20

    I wrote a tutorial on creating a poll that used progressive enhancement at NETTUTS. The idea is to create a functional site using XHTML/CSS and PHP, and then intercept forms etc with Javascript. (I used JQuery).

    0 讨论(0)
  • 2020-12-03 05:20

    This is such an important concept and it saddens me that so few web developers understand it.

    Basically, start by building a site/framework in Plain Old HTML -- structural elements, links and forms. Then add on some style and then shiny stuff (Ajax or what have you).

    It's not very difficult. Like palehorse says, graceful degradation is more work.

    Websites should work in any user agent, not look the same (not even look but sound if your vision impaired), just work.

    0 讨论(0)
  • 2020-12-03 05:21

    Basically, if your site still works with JavaScript turned off, then anything you add with JavaScript can be considered progressive enhancement.

    Some people may think that this is unnecessary, but plenty of people browse with addons like NoScript (or, with JavaScript simply turned off in their browser settings). In addition, many Mobile web browsers may or may not support JavaScript. So, it's always a good idea to test your site completely with and without JavaScript.

    0 讨论(0)
  • 2020-12-03 05:23

    As you've said

    To me, that seems a bit overkill, since viewing the site without Javascript will probably break most of it.

    This isn't progressive enhancement. Progressive enhancement is when the site works perfectly without JavaScript or CSS, and then adding (layering) these extra technologies/code to increase the usability and functionality of the website.

    The best example I can give is the tag input box on this website. With JavaScript turned off, it would still work allowing you to enter tags separated with a space. With JavaScript turned on, you get a drop down with suggestions of previous entries.

    This is progressive enhancement.

    0 讨论(0)
  • 2020-12-03 05:30

    Going at it from the other direction is sometimes referred to as graceful degradation. This is usually needed when the site is built first with the enhanced functionality afforded by the various technologies then modified to degrade gracefully for browsers with those technologies are not available.

    It is also graceful degradation when designing to work with older browsers (ancient in the Internets terminology) such as IE 5.5, Netscape, etc...

    In my opinion it is much more work to gracefully degrade the application. Progressively enhancing it tends to be much more efficient; however, sometimes the need to take an existing app and make it accessible in these lacking environments arise.

    0 讨论(0)
提交回复
热议问题