by throwaway284534 · 5y ago · 0 comments
What really gets me is this kind of Good Samaritan plea to developers to just “do the right thing” as if every line of JavaScript was paid in orphan tears and puppy blood.
It’s 2021 and at this point it really feels like they’re begging the question: “Sites that require JavaScript are not as good as sites that don’t because they can’t operate without JavaScript.” We already know that. It’s well understood what makes a site feel slow. Progressive enhancement is an ideal situation — it’s just not something that every organization prioritizes. And for some web apps, server side rendering adds significant overhead to problems like caching, authentication, and multi platform compatibility.
If you’re honestly invested in progressive enhancement, contribute to open source tools that make it easier to ship.
I by no means am I ann all JavaScript is bad zealot, but I do browse with it disabled by default so I don't have to trust that every single third-party developer is good enough to prevent some malicious douche nozzle from injecting some rogue script that either turns my web browser into a botnet, starts mining crypto for somebody, or exploits the newest silicone defect and is now uploading my in-memory keys to some cloud provider. and while I would agree it's unreasonable to expect complete functionality from your site with the scripting disabled, I don't think it's unreasonable to expect your page to at least partially load. I get it JavaScript developers for the most part don't give a shit about security* but some of us do and it would be nice if it wasn't a constant battle between the two of us.
*to you the random JavaScript developer who actually does care you notice I didn't say all but you have to admit your colleagues are often guilty.
But there's also things you can't do without Javascript. For example, if you want a fade-in animation to play when the user scrolls to a certain spot on the page, you'll probably want to calculate the user's scroll position with Javascript. If you don't address the no-JS case specifically, the element will never fade-in for users without Javascript!
lol, you got me in the first half there; I was already mentally constructing my reply before I eventually got the sarcasm :D Well played!
Yeah, I'm aware of these cases. I'm not demanding your web3.0 real time interactive multiplayer pokemon clone work without JS. But it would be nice if the text and images on your root index page would load without JS, so that I could decide if I want to run your arbitrary code on my computer without feeling like I'm rolling the dice.
> Because a non JavaScript version of lots of applications means a dynamic server generating HTML.
You haven't heard of page pre-generation have you? You could use JS to generate all the basic html you need, save that, and serve it somewhere from some basic HTTP server. Then the site would still do something without JS.
> I would argue that building secure, user oriented data-backed applications out of JS clients with backend microservices in the JAMStack style is actually easier than doing it in classic serverside scripting LAMP stack or Ruby on Rails style.
I would argue the exact opposite, but this absolutely comes down to familiarity. I've written more python and html than I have JS. But what's easier still is writing a basic blog with the exclusive intent to deliver information, rather than increase growth, retention, conversion, or whatever metrics sales/growth is asking for today.
You’re right that SSR/pregeneration approaches are a reasonable modern approach to building a simple blog, but still comments are an annoying obstacle to a simple pregenerated page model.
And I’ve got to say: it for sure gets a lot more complex when what you’re building isn’t a blog but a blogging platform.
I’m absolutely not arguing that such a system shouldn’t serve up relatively simple prerendered HTML for article pages by the way - I mean, basic SEO kind of pushes you to do that - but that the rest of the stuff on that blog - the tag clouds and the comments and so on - are actually easier to add through clientside JavaScript integration of simple backend services, than through adding complexity to your serverside HTML generation model.
JavaScript is overused and often at the expense of usability.
Think about it: the very existence of the Reader Mode in popular browsers shows that users no longer can read information on web pages comfortably in the browser and need another specialized layer to remove all the cruft.
- Renderable to both modern and older browsers
- Designed for mobile and desktop screens
- Accessible to those with disabilities
- Supporting some level of offline web app use, ideally avoiding a platform specific App Store
There’s all of that and more, but it’s not is impossible. In fact, requirements like accessibility are often mandated by law. But if I was building a new product, I’d honestly prefer a smaller set of JS friendly customers that I can serve a great experience to, and go from there. Progressive enhancement usually runs opposite to this issue. It’s very time consuming and adds an additional platform complexity to your existing technical product problems.
If I disable JS and/or cookies, I should be able to read the content the web page. Just send over the HTML and CSS and let the web browser do its thing.
If I get a blank page when either/both are disabled, but I do a 'view source' and get pages and pages of stuff, IMHO you're doing something wrong. It doesn't have to have all the functionality, just please have some text be thrown onto my screen.
[1] https://html.spec.whatwg.org/multipage/webappapis.html#enabl...
I's not required to create a site at all, but agreed options are good. And "Because I could" is a perfectly fine reason. But the argument is "should" I require JS not "could" I.
It also provides marquee and blink elements but you’re not obliged to use them.
Flash used to be a de-facto web standard. Yet sites building their navigation entirely in flash were just as shit as sites requiring JS to display some text and images.
When movies started coming out on Blu-ray and not VHS, you could put a graphic like this out to rebut the assumption ‘everyone has Blu-ray’ - and the studios would nod and agree and say ‘yes. We know. We want everyone to buy Blu-ray players and we don’t care about serving people who only have VHS machines’
Websites know some people don’t have JS. And they want those people to use browsers with full JS support, and if they choose not to, who cares?
I mean, there’s a whole stack of people who were excluded before this JavaScript flowchart even got started: do they have a computing device? Is it connected to the internet? Is it charged or plugged in to power? Have they heard of your site? Do they speak a language your site is offered in?
For instance, some critical services would do best to be available without those technical constraints.
So for a chat system for video games? Who cares. For my online banking when they no longer staff tellers? It should probably be more of a consideration, or at least offer a parallel, stripped-down portal. Not everyone who needs to access that kind of service has the means for a fast enough computer to run some of the websites out there.
I'm not saying JS-forward web apps shouldn't exist. I'm saying that some services should not only offer JS-forward web apps if their obligatory clientele ranges across the entire spectrum in terms of financial or technological resources and physical ability. Screen readers do not fare well on poorly structured and JS-forward web sites, for example—but the blind still need to access their online banking when their local bank branch removed their tellers and replaced them with a terminal that accesses the web portal alone...
Rather it is saying that not every load of your page will run the JS. 99% might but 1% won’t to make up some stats.
So you need to decide how your app behaves when there is no JS.
I work for a very rich desktop experience web app company where there is nothing you can do! Best things is have a nicely styled “sorry” message as a default.
If you are operating a mail client, maybe you can have a seperate low fi mode. Or choose a tech that allows server side rendering, which is running that JS on the server and then losing up that page.
There are trades offs for every site. From no-JS-in-the-first-place static marketing sites to web app versions of native apps with all the whistles.
It comes back to technical and architectural and UX design.
The post here is a reminder. Some of your client loads won’t have JS running, of that you can be sure.
We are far past the "do the right thing" plea. At this point, many major sites are simply not on my browsing menu, and I write tools to extract any data that I care about. It is now a systemic issue: How much do you trust random publishers to not attempt to compromise your Web browser?