Live data from Hacker News

A day without JavaScript

sonniesedge.co.uk

341–350 of 412 posts

Re: A day without JavaScript

#341

Mozilla is partly to blame here by taking away the "Disable Javascript" control, which effectively told websites they could go crazy with JS and ignore the "no-JS" users. What might be helpful now is something like a MAX-JS-BYTES=n header that tells site owners that the useragent will ignore any JS beyond the first n bytes on the page, and will not request more once that limit is reached. (I know this is a terrible i…

>Mozilla is partly to blame here by taking away the "Disable Javascript" control, which effectively told websites they could go crazy with JS and ignore the "no-JS" users.

One might say, for other reasons, that Mozilla is 100% to blame for all of it.

Re: A day without JavaScript

#342
post #300

Earlier quoted context omitted.

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…

I was oversimplifying, hense the smiley. But since you want to argue... A request to an HTML document with no JavaScript src links, image links, or CSS links will not make multiple requests. I'm old enough to remember when I had to actively tell images to load. The code for the page is written by programmers. Programmers cause browsers to make multiple requests. Often times without understanding "the spec".

Unless there's a non-JS src link, or a non-CSS link tag, or an xml:base attribute, or an area element with an href attribute, or... you get the idea.

Re: A day without JavaScript

#343

Are there any JS frameworks that make it easy to build SPAs that degrade gracefully when JS isn't available? I know there's a lot of work done on making server-side rendering work with React / Vue / whatever, but I'm wondering if there's a framework available that asks for some tradeoffs in how your SPA is structured in order to maximize the amount of functionality available when scripting is off (similar to how Redu…

You can achieve that with any view library which can rehydrate from a server-rendered version and can support your minimum list of requirements. The specifics depends on the libraries you're using.

I was experimenting with this [1] a couple of years ago with React, react-router and a form library based on django.forms. The key was to handle form submission in components which behaved like they were servicing a request on both sides, passing in the POST body on the server or form data extracted in the same format on the client.

There's some not-so-fun plumbing to make sure everybody has the data they need to re-render with user input and validation errors when they happen, and to handle redirect-after-submit properly on both sides, but I initially had to hack some of the necessary plumbing into a pre v1.0.0 react-router so the specifics are probably no longer relevant.

[1] https://isomorphic-lab.herokuapp.com

Re: A day without JavaScript

#344
post #182
post #166

Earlier quoted context omitted.

I think it's a joke.

I actually learned that as a CS student.

If it was actually part of the curriculum I sure hope that it was in some design centered elective class. IMO if your CS degree spent time teaching that as part of the core curriculum, they missed an opportunity to put more Math, PL theory, and interesting algorithms in there, because there's more than can be sanely covered in any one curriculum.

Since it's accessibility based, it's more laudable than teaching CS students how to center a div, but it's not like it really requires a mentor of some sort to express the nuances of, right? Or even if it does, it's still design.

Re: A day without JavaScript

#346
post #40

Earlier quoted context omitted.

Note: The color-coding is likely to change in future Chrome releases. I am a little surprised to find such an issue in Google software as it is a topic for first semester CS undergraduates ;-)

Wait what? CS students learn color about color blindness now? I really wasn't in the good classes!

I learned it in both my computer graphics course and my user-interaction design course as part of my CS degree (German university). None of these courses are required, but they are popular enough that the most important lessons were pretty universal knowledge among students.

Re: A day without JavaScript

#347
post #86

Earlier quoted context omitted.

NoScript doesn't actually work half the time; even when you whitelist a site through it the site could well remain busted. Source: bitter experience.

Presumably this occurs when the site uses a CDN for their js libraries (or even their main js). After a few days you start to spot which domains need to be enabled and which can be safely ignored.

Can you whitelist a CDN but only for a specific site?

Re: A day without JavaScript

#348
post #342

Earlier quoted context omitted.

I was oversimplifying, hense the smiley. But since you want to argue... A request to an HTML document with no JavaScript src links, image links, or CSS links will not make multiple requests. I'm old enough to remember when I had to actively tell images to load. The code for the page is written by programmers. Programmers cause browsers to make multiple requests. Often times without understanding "the spec".

Unless there's a non-JS src link, or a non-CSS link tag, or an xml:base attribute, or an area element with an href attribute, or... you get the idea.

All things put in by a programmer.

You get my point.

Re: A day without JavaScript

#349

Earlier quoted context omitted.

For me, yes. I should be able to see at least the main content of your blog without JS. I don't care if it's perfectly formatted or styled. Just put the text in a div. When I go to a blog post linked from HN and see a white empty page I will just move on.

Good. Please leave. I don't walk into a restaurant and demand that they cook my food without using a knife. Don't expect modern websites to bend over backwards for a (frankly rather juvenile) view of a modern web standard. Code execution is part of the web, it's here to stay, the number of sites that support non-JS experiences will continue to dwindle. You're not some special snowflake. Other people make real decisio…

Where does the cost of making a blog readable without javascript com from? It takes a lot of extra effort to make a blog that requires javascript.

As far as I'm concerned, if it's not readable without javascript then you've got nothing intelligent to say anyway.

Re: A day without JavaScript

#350
post #338

Earlier quoted context omitted.

I don't think more powerful tools are the solution here. The problems and solution are obvious. The root problem is that many "product" teams will take any 10x improvement from tooling and adapt by being 10x more inefficient. Because they can. Hardware (laptops, phones), and browsers js and rendering engines, are all 10x faster than they were 10 years ago, giving 100x to 1000x overall speedup. Think about that, it is…

"Work expands to fill the time allocated for its completion." This holds true for computer scripts executing a workload as well.

Developers tend to over time expand their programs to fill available memory and take up available CPU, too. My currently open text editor's memory footprint is apparently 36.6MB, and it is displaying a single file composed of ~1000 characters.
Post reply on HN