4 ms·
There is also CSS media now to detect if is enabled or not. It' s supported in last 2 versions of most popular browsers. https://developer.mozilla.org/en-US/do
by kaszus 1y ago
There is also CSS media now to detect if is enabled or not.
It' s supported in last 2 versions of most popular browsers.
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/scripting https://developer.mozilla.org/en-US/docs/Web/CSS/@media/scri...
- gjsman-1000 1y agoBy the time you are on the last 2 versions of popular browsers, you’re at the point a developer can safely assume you have JavaScript, and can force you to use it.
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- zamadatix 1y agoThe article is written around supporting "users who have JavaScript off", which is an option on all popular browsers. I.e. it's about better supporting users who don't want to use JavaScript, not about supporting e.g. Internet Explorer 1.0 (though that could be helped by this kind of strategy too).
- gjsman-1000 1y agoWhich in practice is an irrelevantly low number of people. Nowadays, unless you are serving developing markets, supporting legacy technology, or your website is truly just some basic static pages, it’s a buzzword programmers use to flex on each other. That’s about it. I personally find it annoying because I grew up as a junior right at the inflection point, when all the tutorials were still saying it was the right thing to do. That’s a lot of work to do for something nobody - and I mean literally nobody - in the real world cares about anymore. I would sooner brag about how my blog still works on Safari bundled with Snow Leopard.
- zamadatix 1y agoOr it's something fun for a hacker to blog about polishing progressive enhancement on. You're free to choose your own takeaway of course. Part of the experience of being a junior is learning when which type of approach makes sense rather than expecting anything one reads to directly apply to how their next project should best be done, regardless if it's popular or unpopular. Not everything needs to be practical for most people to be worth writing about!
- sneak 1y agoI am not nobody. Neither is Ed Snowden. Neither are the people who trained him, who regularly use javascript to exploit browsers. Many of us that know how security works on the modern web browse untrusted sites without JS enabled.
- userbinator 1y agoThis. The vast majority of browser exploits are in code related to the JS engine and its accompanying huge API surfaces, and even those rare ones which don't require it are often obfuscated/hidden using JS. Exploits aside, the amount of user-hostile irritating annoyances that just disappear without JS is also worth mentioning. Many years ago, I remember a site that was completely usable, yet continually begged me to "enable JavaScript for a better experience!", so I tried it and was immediately inundated with popups, moving flashing crap all over the page, and other things that I did NOT consider a "better experience". Never again.
- perching_aix 1y agoYou mean the real world that can barely distinguish their browser from "Google"? Sounds like a very fair benchmark indeed. Did you know that HackerNews is 99% functional with JS turned off by the way? The only thing missing is the ability to collapse threads.
- lolinder 1y agoIt's still only available on about 90% of global browser traffic. If you're going out of your way to support noscript smoothly, you probably care about supporting more than just 90% of web traffic. https://caniuse.com/mdn-css_at-rules_media_scripting https://caniuse.com/mdn-css_at-rules_media_scripting
- riedel 1y agoI would guess even in absolute terms there will be more browsers with JavaScript disabled within the remaining 10%
- ffsm8 1y agoYou think people that keep JS disabled will on average use older browsers? Idk, I honestly doubt that. In my experience the people using outdated browsers are on old mobile devices and some "special" enterprises micromanaging employee software installs And technologically illiterate apple users (because Safari doesn't Auto update like Chrome and Firefox)
- 0xdade 1y agoDamn I didn't know this. I don't know how my search failed to turn this up, because I was literally googling how to accomplish it with media queries lol.
- microflash 1y agoThis is how `noscript` tags are hidden by UA styles. https://www.naiyerasif.com/post/2023/12/17/detect-scripting-support-with-css/ https://www.naiyerasif.com/post/2023/12/17/detect-scripting-...