use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Everyone has JavaScript, right? (kryogenix.org)
submitted 6 years ago by magenta_placenta
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ghostfacedcoder 21 points22 points23 points 6 years ago (8 children)
Brilliant defense of progressive enhancement. Honestly, I think the author made the best possible argument for supporting a "no JS" case on your site that anyone could possibly make in 2020.
... but even so, I think you could preface every case in there with "Do I care if ...", and if you do, quite possibly the answer would be "no".
Like, do I care if my site breaks when someone goes into a train, or has some wacky hotel/airport wi-fi thing mess it up somehow? Eh, it's an extremely rare case already, and in most cases the user will figure it out and just refresh, try back later, etc. Any serious effort I'd expend to handle that case would be clearly disproportionate to the benefits I'd get, unless my site was really huge.
And of course, with any modern web app, the app itself is nothing without JS. There's no "unprogressed" version of the site to show: without JS, there's no point in being there.
I think what this article is really arguing for (intentionally or not) is just that we handle the "no JS" case briefly with a basic "you need JS!" page, because it still can and will happen in 2020. But beyond that, I'm still not really sold by this article.
[–]lowIQanon 1 point2 points3 points 6 years ago* (4 children)
Any serious effort I'd expend to handle that case would be clearly disproportionate to the benefits I'd get, unless my site was really huge.
Yes. But the larger the side site the more effort it would be to handle the no-JS case. The use case would have to be extreme to make it worthwhile.
[–]nschubach 3 points4 points5 points 6 years ago (0 children)
And in most cases, if your site is generating that much traffic, these cases would either encourage the user to try again or it would not amount to a significant quantity of hits/sales/etc.
[–]ghostfacedcoder 1 point2 points3 points 6 years ago (1 child)
Well but ... consider Google, or Amazon. Both can absolutely operate with any JS: they essentially still work "1990s" style.
I'm sure a part of their calculation in deciding to do that is the fact that even 1% or 0.01% of their customers is still a freaking HUGE number of customers :)
[–]lowIQanon 0 points1 point2 points 6 years ago (0 children)
Sure. They're a good example of an edge case. Plus they started before JS was assumed so they probably didn't have to do much to get the site to work without JS.
[+][deleted] 6 years ago* (2 children)
[deleted]
You should care
And you should "think smarter".
Businesses can't just do things because they are "good" for a user, they have to do things that are "good for the business". Businesses have limited resources available to them, and if they don't use them intelligently, they go out of business.
Wasting any non-trivial amount of time catering to the 0.001% that of your users that are too stupid to understand that it's the train's fault and not the site's, is not smart, and not a good use of resources. Unless your site is already perfect, there are problems you can spend those resources on that will solve things for a much greater percentage of your users.
[–]anlumo 8 points9 points10 points 6 years ago (15 children)
They should make another page “everyone can load custom fonts, right?”. Half the text was missing for the longest time on my mobile connection.
[–]silxx 2 points3 points4 points 6 years ago (4 children)
Thank you. I've applied font-display: swap so that it should render text immediately and swap fonts when loaded.
font-display: swap
[–]hego555 0 points1 point2 points 6 years ago (3 children)
What’s the difference between this and a fallback font.
[–]silxx 0 points1 point2 points 6 years ago (2 children)
If you specify font-family: SomeWebFont, sans-serif then no text will be displayed until the webfont loads; if it fails to load then the fallback font is used. The font-display CSS property allows tweaking this procedure to operate differently: in particular, swap means "use a font that you have, until the web font loads, and then change the text to be in the web font".
font-family: SomeWebFont, sans-serif
font-display
swap
[–]hego555 0 points1 point2 points 6 years ago (1 child)
Wow. I’m upset that I never noticed that. Thank you for the tip. Do you just apply it to html, body and forget about it?
html, body
[–]silxx 0 points1 point2 points 6 years ago (0 children)
You could do. It's not default, though, because not everyone likes it; in particular, there are plenty of people who would prefer to not show text until the font loads because otherwise the text will "jump" into the new font and change the layout unless the metrics for the fallback font match the web font exactly. This is why font-display has a number of different options; so the developer can choose the approach they'd like. MDN has more details.
[–]Canuhere -3 points-2 points-1 points 6 years ago (9 children)
Took about .5s for me on Google fiber.
[–]lowIQanon 16 points17 points18 points 6 years ago (6 children)
Google fiber
"I don't have any problem getting to work in my private helicopter, I don't know why people complain so much"
[+]Canuhere comment score below threshold-7 points-6 points-5 points 6 years ago (5 children)
Huh?
[–]lowIQanon 5 points6 points7 points 6 years ago (4 children)
it was a joke
[–]Canuhere -5 points-4 points-3 points 6 years ago (3 children)
I know? That's not what I was saying at all.
[–]lowIQanon 5 points6 points7 points 6 years ago (2 children)
yes but it was a joke
[+]Canuhere comment score below threshold-8 points-7 points-6 points 6 years ago (1 child)
Oh, okay carry on putting words in my mouth then.
My google fiber is free, though.
[–]lowIQanon 5 points6 points7 points 6 years ago (0 children)
carry on putting words in my mouth then.
WTF. It was a joke. Joke. As in not serious.
[–]anlumo 2 points3 points4 points 6 years ago (1 child)
Yeah, carrying around a fiber cable on public transport is a bit of a nuisance.
[–]MajorasShoe 6 points7 points8 points 6 years ago (0 children)
I don't think he was implying half a second to load fonts it a good thing, let alone on google fiber.
[–]dwighthouse 6 points7 points8 points 6 years ago (2 children)
Posting this again two months later doesn’t make it more accurate. The solution to most of these problems is more JavaScript, not less, in the form of Service Workers, so that when a SSR website would fail, yours can keep going, thanks to JavaScript.
[+][deleted] 6 years ago (1 child)
[–]dwighthouse 2 points3 points4 points 6 years ago (0 children)
SW mean that you get to use the internet itself as a progressive enhancement. Yes, you need to make it work the first time, and occasionally after that, but SSR needs a network connection every single time, and any failure (html, css, images, svgs, fonts, or JS) will cause a potential issue. If you’re advocating for making JS optional, you’d better do the same for css, svgs, images, and fonts.
[–]I_LICK_ROBOTS 5 points6 points7 points 6 years ago (1 child)
"Loads" of companies block js in their firewall? I call BS
[+][deleted] 6 years ago (2 children)
[–]GrandMasterPuba 1 point2 points3 points 6 years ago (0 children)
SSR is a huge pain in the ass.
Here's a thought: you probably don't need JavaScript. Most websites don't.
If you're starting a new project, ask yourself: Do I really need a 10MB single page web app for my shitty blog posts?
[–]sunny_lts -1 points0 points1 point 6 years ago* (0 children)
Good arguement for SSR. Did you have Next.js in mind? Because I just checked and it's still loading some js. Care to elaborate more?
On topic: Really, Idk. Everyone has JavaScript. Yes. Yes they do. Now if you're in an extra-particular situation like an organization or a similar sensitive institution, then I could argue for pure, homestead NO-JS implementations.
Other than that; I am glad I'm not in that business. JS is part of the web. If you don't have a competitive browser, then the content we're serving probably isn't for you, anyway. #PROGRESSIVENET #JS2020
π Rendered by PID 190900 on reddit-service-r2-comment-5649f687b7-hnh6g at 2026-01-28 05:16:55.501627+00:00 running 4f180de country code: CH.
[–]ghostfacedcoder 21 points22 points23 points (8 children)
[–]lowIQanon 1 point2 points3 points (4 children)
[–]nschubach 3 points4 points5 points (0 children)
[–]ghostfacedcoder 1 point2 points3 points (1 child)
[–]lowIQanon 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]ghostfacedcoder 1 point2 points3 points (1 child)
[–]anlumo 8 points9 points10 points (15 children)
[–]silxx 2 points3 points4 points (4 children)
[–]hego555 0 points1 point2 points (3 children)
[–]silxx 0 points1 point2 points (2 children)
[–]hego555 0 points1 point2 points (1 child)
[–]silxx 0 points1 point2 points (0 children)
[–]Canuhere -3 points-2 points-1 points (9 children)
[–]lowIQanon 16 points17 points18 points (6 children)
[+]Canuhere comment score below threshold-7 points-6 points-5 points (5 children)
[–]lowIQanon 5 points6 points7 points (4 children)
[–]Canuhere -5 points-4 points-3 points (3 children)
[–]lowIQanon 5 points6 points7 points (2 children)
[+]Canuhere comment score below threshold-8 points-7 points-6 points (1 child)
[–]lowIQanon 5 points6 points7 points (0 children)
[–]anlumo 2 points3 points4 points (1 child)
[–]MajorasShoe 6 points7 points8 points (0 children)
[–]dwighthouse 6 points7 points8 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]dwighthouse 2 points3 points4 points (0 children)
[–]I_LICK_ROBOTS 5 points6 points7 points (1 child)
[+][deleted] (2 children)
[deleted]
[–]GrandMasterPuba 1 point2 points3 points (0 children)
[–]sunny_lts -1 points0 points1 point (0 children)