|
1234567891011121314151617181920212223242526272829303132333435363738 |
- title: Everyone has JavaScript, right?
- url: http://kryogenix.org/code/browser/everyonehasjs.html
- hash_url: cbd31f4a6ef7b7526754a48a1faeada3
-
- <dl>
- <dt>Your user requests your web app</dt>
-
- <dt>Has the page loaded yet?</dt>
- <dd>“All your users are non-JS while they're downloading your JS” — <a href="https://t.co/uTM3255RuW">Jake Archibald</a></dd>
-
- <dt>Did the HTTP request for the JavaScript succeed?</dt>
- <dd>If they're on a train and their net connection goes away before your JavaScript loads, then there's no JavaScript.</dd>
-
- <dt>Did the HTTP request for the JavaScript complete?</dt>
- <dd>How many times have you had a mobile browser hang forever loading a page and then load it instantly when you refresh?</dd>
-
- <dt>Does the corporate firewall block JavaScript?</dt>
- <dd>Because loads of them still do.</dd>
-
- <dt>Does their ISP or mobile operator interfere with downloaded JavaScript?</dt>
- <dd><a href="http://www.theguardian.com/technology/2014/jan/28/sky-broadband-blocks-jquery-web-critical-plugin">Sky accidentally block jQuery</a>, <a href="http://aaron-gustafson.com/notebook/2014/the-network-effect/">Comcast insert ads into your script</a>, and if you've never experienced this before, drive to an airport and use their wifi.</dd>
-
- <dt>Have they switched off JavaScript?</dt>
- <dd>People <a href="https://gds.blog.gov.uk/2013/10/21/how-many-people-are-missing-out-on-javascript-enhancement/">still do</a>.</dd>
-
- <dt>Do they have addons or plugins installed which inject script or alter the DOM in ways you didn't anticipate?</dt>
- <dd>There are thousands of browser extensions. Are you sure none interfere with your JS?</dd>
-
- <dt>Is the CDN up?</dt>
- <dd>CDNs are good at staying up (that’s what being a CDN <em>is</em>) but <a href="http://www.cdnperf.com/">a minute downtime a month</a> will still hit users who browse in that minute.</dd>
-
- <dt>Does their browser support the JavaScript you’ve written?</dt>
- <dd>Check <a href="http://caniuse.com/">Can I Use</a> for browser usage figures.</dd>
-
- <dt><p>Is all the above true?</p><p>Then yes, your JavaScript works.</p><p><strong>Probably.</strong></p></dt>
- <dd><p><a href="http://jakearchibald.com/2013/progressive-enhancement-still-important/">Progressive enhancement</a>. Because sometimes your JavaScript just won’t work.</p>
- <p>Be prepared.</p></dd>
- </dl>
|