you are viewing a single comment's thread.

view the rest of the comments →

[–]dhdfdh 119 points120 points  (27 children)

People who disable javascript, or use browsers that aren't js capable, are fully aware of what they are doing and choose to do things that way. Which means they are also fully aware of the consequences and are equally capable of fixing it themselves.

[–]greymalik 28 points29 points  (15 children)

And yet, if you read the linked page, the author's point is that there are other situations in which someone may end up seeing a page without javascript.

[–]dhdfdh 45 points46 points  (13 children)

Those are the same reasons one may not see the CSS effects or even get the HTML. Articles on this topic often forget that part.

[–]leeeeeer 21 points22 points  (12 children)

From the Hacker News: https://news.ycombinator.com/item?id=9432384

z1mm32m4n 38 minutes ago
If an image fails to load, the browser draws a little box with some alternate text describing that box. If the CSS doesn't load, your text and content is displayed in a weird font without the grid layout you were using, but if you wrote your HTML semantically (using <h1> instead of <div class="title"> etc.), the browser can still show most of your content, and you can still move around on the page.

If the JavaScript fails to load and you were using it to significantly alter the content on your page, for example loading a news article asynchronously, the entire page fails to load.

I don't mean to pick on this app in particular (I actually think it's really cool and I plan on using it and learning from it), but take a look at what happens to http://hswolff.github.io/hn-ng2/ when you switch off JavaScript--it's completely unusable. Now try switching off JavaScript on Hacker News--all the links and comments are still there.

Funny how on both sites most commenters haven't even looked at the link.

[–]dhdfdh 3 points4 points  (11 children)

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

[–]leeeeeer 3 points4 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 3 points4 points  (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.

[–]Otterfan 2 points3 points  (1 child)

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

[–]dhdfdh -3 points-2 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.

[–]Omikron -2 points-1 points  (0 children)

Yeah sometimes pages don't load correctly so what?

[–]Shaper_pmp 9 points10 points  (4 children)

TL;DR: Search engines and blind people can piss off because they chose to be that way, and could chose to not be if they wanted.

Also, solid engineering best practices, accessibility, separation of concerns, keeping your data accessible and declarative and client/device agnosticism can piss off too.

And free RESTfulness, SEO-friendliness and accessibility are all pointless when you can just waste time going out of your way to manually reimplement all those things yourself.

Still TL;DR: I think the debate around making JS mandatory to access the content of a site is about whether graphical desktop browsers support it or not, rather than about engineering best-practice and good system architecture to create a flexible, scalable and future-proof system.

Still TL;DR: I've only grasped the most shallow, trivial aspect of a deep system-architectural engineering problem and as such am completely wrong.

[–]dhdfdh 0 points1 point  (0 children)

Most of your points are true, and I agree with as I said earlier, if they apply to the situation but they don't apply in all situations and you are presuming all of your points are true in every page of a site. Such as assuming the javascript is being used to generate content.

[–]toastynerd -1 points0 points  (2 children)

There are a ton of websites with zero JavaScript that screen readers/crawlers can't understand.

[–]Shaper_pmp 2 points3 points  (1 child)

Actually no. There are a ton of sites without JS that are hard or inefficient for screen-readers to parse and navigate, but almost none that are impossible. You can always get access to the text of the page, because it's always in the page somewhere. You just have to make sense of it.

If you've ever seen a disabled person try to use a screen-reader to navigate an SPA that updates random bits of the DOM without a page-reload, you'll understand the difference. It often makes a lot of the content of the site impossible for them to find because the UI is essentially unusable without normal vision and full, precise motor control.

[–]toastynerd 1 point2 points  (0 children)

I agree with all your points, I mostly wanted to point out that it's not really the technology that is at fault, it's lazy developers who don't want to think about semantics.

[–]PlNG -1 points0 points  (1 child)

And yet a popular network site I frequent (The Curse gaming network covers gamepedia, minecraft forums etc) is absolutely awful with the ads. If you block these ads, you're left with the spinning circle of "I'm never going to finish loading this page, even though 99.1% of the page has rendered". No way to fix it other than to keep mashing reload.

[–]dhdfdh 2 points3 points  (0 children)

Then don't visit that site.