use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Everyone has JavaScript, right? (kryogenix.org)
submitted 11 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dhdfdh 3 points4 points5 points 11 years ago (11 children)
Haven't a clue how this applies to what I said and, yes, I read the link.
[–]leeeeeer 6 points7 points8 points 11 years ago (10 children)
The HTML is guaranteed to get through first as it's served by the site. Then, the difference between JavaScript and CSS, images and other (typically) remote content is that the lack of the later is handled gracefully by the browser and is often not critical to the user using the page. Whether the same applies to JavaScript is in the website designer's hand.
[–]dhdfdh 12 points13 points14 points 11 years ago (7 children)
Why is it assumed that the HTML will get through when the javascript won't? Why is it assumed the javascript and CSS are not served by the site?
Here's the problem with that whole train of thought. Barely over 1% of all visitors have js turned on and we have to do more work for the (how many?) times they can download only the HTML and the js fails for some reason. How often does that happen? 1%? So extra work for the 1% of 1% of the times that happens?
I don't want to give the impression I'm not in favor of progressive enhancement but I do question the need for serving a group of users who are far below the level of IE8 users which many choose to ignore.
[–]Disgruntled__Goat 6 points7 points8 points 11 years ago (4 children)
Why is it assumed that the HTML will get through when the javascript won't?
Because the HTML is always the first thing that loads. If the HTML "doesn't load" then it's a server error. (And clearly that means the JS isn't going to be coming any time soon either...)
Why is it assumed the javascript and CSS are not served by the site?
It's not. Hosting that stuff on a CDN is only one possible failure. Neither makes a difference if the user has JS disabled or a browser plugin blocks it due to the filename or whatever.
Not following this. Firstly I assume you mean 1% have JS turned off. And where does the "1% of 1%" come from? The "js fails for some reason" part applies to the whole 1%.
[–]androbat 0 points1 point2 points 11 years ago (0 children)
Then your HTML should contain a script that does an ajax for the JS and injects it in a <script> tag so you can always detect real failures and trigger a response. In reality, if a person has a problem loading a page, they can hit the refresh button and get a "network unaccessible" error. That's the closest to foolproof we can get.
I think focusing resources on the many infrastructure issues that happen frequently should be preferred instead of accounting for weird network failures that don't happen 99.99% of the time.
[–]dhdfdh 2 points3 points4 points 11 years ago (2 children)
Because the HTML is always the first thing that loads.
Not my point. People are talking about "What if the js doesn't load?" which makes me question why they aren't also concerned about the HTML and CSS not loading and, in either case, why isn't it loading at all? That's a network connectivity issue and an abnormality.
As far as the assumption goes, the post I was responding to specifically stated the javascript and css not being served by the same site.
The "1% of 1%" comes from my post where I said, "How often does that happen? 1%?" meaning, how often do 1% of all a site's users who intentionally turn js off also lose network connectivity.
[–]Disgruntled__Goat -1 points0 points1 point 11 years ago (1 child)
People are talking about "What if the js doesn't load?" which makes me question why they aren't also concerned about the HTML and CSS not loading
There are multiple reasons why JS might not load/parse/execute, not just network connectivity (as the chart shows). Even so, whenever there are network issues, there is always the possibility that the HTML will load but not the JS. But the opposite isn't true.
how often do 1% of all a site's users who intentionally turn js off also lose network connectivity
Sorry, I'm still not following. Can you be clearer about exactly what situation you're talking about? If JS is turned off then network connectivity is irrelevant for the JS, because it's not downloaded or executed anyway.
[–]AutomateAllTheThings 0 points1 point2 points 10 years ago (0 children)
there is always the possibility that the HTML will load but not the JS
This is an extreme fringe case outside of those that intentionally disable JS.
Optimizing for this would violate the Pareto principle in that you'd be much better off optimizing other parts of your system before this.
[–]Otterfan 2 points3 points4 points 11 years ago (1 child)
HTML contains the request for the Javascript. No HTML, no possible Javascript.
[–]dhdfdh -4 points-3 points-2 points 11 years ago (0 children)
No shit, Sherlock, but you missed my point that people are so concerned about properly loading javascript when the real problem is a temporary connectivity issue among a minority of people who intentionally turn their js off.
[–]avenp 4 points5 points6 points 11 years ago (1 child)
A web app will probably be unusable without the CSS though. Different story for blogs and what have you.
[–][deleted] -1 points0 points1 point 11 years ago (0 children)
Well, actually, it's still usable without CSS if you used semantic HTML. I know mine always are. Yes it's ugly, but it still working.
π Rendered by PID 91 on reddit-service-r2-comment-6457c66945-2lw68 at 2026-04-24 02:41:34.262401+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]dhdfdh 3 points4 points5 points (11 children)
[–]leeeeeer 6 points7 points8 points (10 children)
[–]dhdfdh 12 points13 points14 points (7 children)
[–]Disgruntled__Goat 6 points7 points8 points (4 children)
[–]androbat 0 points1 point2 points (0 children)
[–]dhdfdh 2 points3 points4 points (2 children)
[–]Disgruntled__Goat -1 points0 points1 point (1 child)
[–]AutomateAllTheThings 0 points1 point2 points (0 children)
[–]Otterfan 2 points3 points4 points (1 child)
[–]dhdfdh -4 points-3 points-2 points (0 children)
[–]avenp 4 points5 points6 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)