Earlier quoted context omitted.
I agree with you about liberal arts and have the college transcripts to prove it. Unfortunately, your HN comments have been frequently uncivil and/or unsubstantive. Would you please not post like that? It's just what we're trying to avoid here. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newswelcome.html
Would you be so kind to point out how would a liberal art knowledge would help people like me understanding the issues better? I think I understand where my opponents stand, but I disagree with a part of them.
A day without JavaScript
401–410 of 412 posts
Re: A day without JavaScript
#402Earlier quoted context omitted.
Even without JS, there are tricks to make the upvote button work without refreshing the page. HN used to do this, not sure if it still does.
Do you have a reference to any of those tricks? Sounds interesting.
.vote-42:active{ background-image: url(/api/vote/42) } Vote
Re: A day without JavaScript
#403>Verdict: Cartography catastrophe. As much as I hate JavaScript, Google Maps gets a pass. I'm pretty sure the code behind it is thoroughly tested. We can just suck it up and turn JavaScript on for one of the most useful tools from the internet -- how hard is it to find something that whitelists domains to run JS anyway?
Re: A day without JavaScript
#404Earlier quoted context omitted.
Not really. They gave permission for the initial GET request for the HTML. The rest of the requests were inserted into the document by the programmer and executed by the browser. The browser assumed those links should be fetched automatically and executed. :)
The rest of the requests were triggered by the browser, not the programmer, because they were part of the initial HTML and the browser follows the HTML spec. The person complaining about it and is technical and knows this, they were under no misconception that they were viewing a document format that doesn't include code execution. Of which I'm having trouble of even thinking of an example, because even Word document…
So an HTML document viewed in a browser with JS off should not itself run code, ever.
Re: A day without JavaScript
#405Earlier quoted context omitted.
Do you have a reference to any of those tricks? Sounds interesting.
You could use a link with a background-image .vote-42:active{ background-image: url(/api/vote/42) } Vote
https://codepen.io/anon/pen/weMwRz
Realistically, I'd probably never use it because it's so dependent on browser behavior, but still a cool alternative.
Re: A day without JavaScript
#406Earlier quoted context omitted.
I wouldn't say it's "quite easily" done. The most obvious challenge is components that depend on data loaded asynchronously: If the only thing the component renders is a "loading" message while it fetches something from an API, that's all that the server is going to render as well. So you have to figure out a way to render asynchronously on the server-side, and then you also have to come up with a generic way to hand…
Agreed, but the overhead of coming up with "generic" ways to handle all of these interactive features like data fetching, redirects, etc, isn't that big (at least from what I've experienced). It's good to have a standardised way of doing all of those things anyway, and when you do, you can make sure they all work on the server.
All the other stuff is pretty easy, though. :)
Re: A day without JavaScript
#407Earlier quoted context omitted.
This reasoning i.e. "supporting" people who are not using Javascript make little sense. It is the Javascript and website complexity, the embellishment of data with needless garbage, that necessitates "support" i.e. work for developers. It creates more work. Serving text without embellishment requires less work, not more. At some time or place in every website development project, data exists in plain text or some oth…
That argument only makes sense for informational websites with heavy focus on textual data. But the article looks at web apps like google maps. Good luck creating a static version of that. + I'm not saying 99.99% WANTS javascript, I'm saying 99.99% HAS javascript. And the economics of supporting the other 0.01% often don't add up. So people can arrogantly claim here: 'If your site requires javascript, I don't want to…
A large amount of data maybe even the majority is already textual. For this data, from a user's persective there is no valid argument that "supporting" users who want to read text requires additonal work. Serving textual data certainly does not require javascript.
The "arrogance" if any is displyed by a website owner who for some unexplained reason does not want to let any users (e.g. 0.1%) read text without runing javascript. As if any user who does not care about whether the website makes use of the latest popular browser features is a user they do not want. But maybe that is not really the reason.
It is the last sentence in your comment that is the interesting one. Perhaps the use of javascript is designed to take something from the customer e.g. personal data via some discreet mechanism that requires running code on the user's computer. If this is true, then one might argue it becomes clear why website owners do not want users who do not use javascript. Because the website cannot take something from the user where the mechanism of extraction is powered by javascript.
If that is the case, it may inform the user about the website e.g. any website that tries to force users to use javascript may be one that is trying to extract something from the user. And as such may be a wesbite that the user should avoid.
As a sidenote, websites routinely serve content as text without the use of javascript because that is how they are most efficiently indexed by Google. Thus the website must "support" Googlebot. Some users may be quite satisified with the "Googlebot version" of the website.
Re: A day without JavaScript
#408Earlier quoted context omitted.
Websites shouldn't break if you disable CSS - just look worse. The text should still be perfectly readable and images viewable.
That's an unreasonable expectation. Many websites have complex content and layouts, and no web designer will build their site to gracefully fall back with CSS disabled. That just doesn't happen.
Website layouts need to be made linear (single column) for display on mobile and the content order usually reflects that anyway. They also need to make sense when using screen readers.
Disabling CSS and checking the result gives you a quick sanity test that the content order makes sense and that the markup is used somewhat correctly. It won't be pretty, but it should be useable.
Re: A day without JavaScript
#409Earlier quoted context omitted.
Good luck supporting old android browsers, IE and dealing with the inconsistencies between browsers. It only takes one look at the jQuery source code to understand why it's not a good idea to "roll your own jQuery".
Simply don't target old browsers. If people don't use JS, or don't have a modern browser, feel free to go elsewhere. I don't target edge cases as I don't get paid to.
Re: A day without JavaScript
#410Having browsed nearly JS-free for the last two-ish years, aside from a bit of tweaking at the start, I have to say that it has made things a lot faster, more stable, and just much more of a pleasure to navigate. If anyone is interested, I have found that two tools make life a lot easier: - NoScript, which blocks execution of scripts save for those you whitelist. This means sites that reasonably require JS (e.g. YouTu…