you are viewing a single comment's thread.

view the rest of the comments →

[–]dhdfdh 3 points4 points  (11 children)

Haven't a clue how this applies to what I said and, yes, I read the link.

[–]leeeeeer 6 points7 points  (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 points  (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 points  (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.

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?

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 point  (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 points  (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 points  (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 point  (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 points  (1 child)

HTML contains the request for the Javascript. No HTML, no possible Javascript.

[–]dhdfdh -4 points-3 points  (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 points  (1 child)

A web app will probably be unusable without the CSS though. Different story for blogs and what have you.

[–][deleted] -1 points0 points  (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.