JavaScript: Difference between revisions

From IndieWeb
(β†’β€ŽSites break without Javascript: explain why this is relevant)
Line 4: Line 4:


== Criticism ==
== Criticism ==
=== Sites break without Javascript ===
Although javascript is nowadays probably just as important for the client-side rendering of a web page as are html and css, and even [http://googlewebmastercentral.blogspot.de/2014/10/updating-our-technical-webmaster.html Google now crawls with javascript turned on], there is a wide concensus that javascript should only be used with progressive enhancement in mind. Make sure your site does not break when javascript is unavailable, or if the javascript is faulty.
Β 
=== Sites break without javascript ===
Javascript seems to have engendered web development methodologies that depend on it. Many sites seem to break without it, become inaccessible.
Javascript seems to have engendered web development methodologies that depend on it. Many sites seem to break without it, become inaccessible.
* http://sighjavascript.tumblr.com/ provides examples of sites that do poorly without javascript
* http://sighjavascript.tumblr.com/ provides examples of sites that do poorly without javascript


Although it is unlikely that visitors of your site still use a browser that does not support javascript as a technology, there are two other situations in which this is relevant to you as a webmaster. The first is when a search engine crawler indexes your site: they may not index text content unless it is accessible without javascript.
Although it is unlikely that visitors of your site still use a browser that does not support javascript as a technology, a visitor of your website may use a javascript blocker like [https://noscript.net/ noscript], which people sometimes do to [https://www.fsf.org/campaigns/freejs avoid directly consuming proprietary software], or simply to save CPU.


The second situation is when a visitor of your website uses a javascript blocker like [https://noscript.net/ noscript], which people sometimes do to [https://www.fsf.org/campaigns/freejs avoid directly consuming proprietary software].
=== Sites break with faulty javascript ===
When you add your own javascript code to your site and get it wrong, it may [http://htmlcssjavascript.com/web/youre-so-smart-you-turned-javascript-into-xhtml/ break the page as a whole], even if the bit of javascript that broke was only adding a small additional feature.


== See Also ==
== See Also ==

Revision as of 09:44, 12 December 2014


JavaScript (JS) is a popular programming language due to its nearly ubiquitous availability in web browsers, and growing web server availability in the form of node.js.

Criticism

Although javascript is nowadays probably just as important for the client-side rendering of a web page as are html and css, and even Google now crawls with javascript turned on, there is a wide concensus that javascript should only be used with progressive enhancement in mind. Make sure your site does not break when javascript is unavailable, or if the javascript is faulty.

Sites break without javascript

Javascript seems to have engendered web development methodologies that depend on it. Many sites seem to break without it, become inaccessible.

Although it is unlikely that visitors of your site still use a browser that does not support javascript as a technology, a visitor of your website may use a javascript blocker like noscript, which people sometimes do to avoid directly consuming proprietary software, or simply to save CPU.

Sites break with faulty javascript

When you add your own javascript code to your site and get it wrong, it may break the page as a whole, even if the bit of javascript that broke was only adding a small additional feature.

See Also