9 ms·
Everyone has JavaScript, right?
- stephenr 12y agoI'm so glad to see there is still some sanity in the world.
- jmkni 12y agoIf CDN's based in the US need to do maintenance, they will probably do it late at night in the US, which might be at peak time for you if your website is based outside of the US. Just a though.
- gtirloni 12y agoI didn't get the point this website is trying to make. All distributed apps are like that at time of delivering the code. If that's so wrong with Javascript, what's the proposed alternative (that has a chance of being available everywhere)?
- dreen 12y agoI think the point of this is more against requiring some JS to load and work in order to do things which do not require JS in the first place, like displaying some static text or laying out the page. It also highlights the importance of progressive enhancement.
- gboone42 12y agoAmazing how many of these probably go away by ditching your CDN and using SPDY/HTTP2.
- cabirum 12y agoRight, but these problems are not specific to javascript requests. Any request can fail, be blocked, interfered with, or partially received. Users can switch off CSS, too. Html page may not load completely. So what? Some of these issues are fixed with https or http/2. Some with CDN fallbacks or just sane coding. Some are not developers problems - such as clueless users installing malicious extensions or luddite users switching off js. Why not ask 'Everyone has html, right?'.
- joelanman 12y agoThe point being made is at the bottom - progressive enhancement. If at least the html makes it across the wire, a progressively enhanced website will still "work": you can still read content, click links, submit forms http://jakearchibald.com/2013/progressive-enhancement-still-important/ http://jakearchibald.com/2013/progressive-enhancement-still-...
- cabirum 12y agoSee this comment: https://news.ycombinator.com/item?id=9432629 https://news.ycombinator.com/item?id=9432629 The web is no longer a collection of text content with links and forms. Many, is not most, web apps cannot be represented using html alone as progressive enhancement suggests. The core functionality just isn't there.
- indeyets 12y agoInitial server-side rendering is still an option. User will be able to read the page, at least. And if URLs use a sane scheme, navigation would work too
- cabirum 12y agoNot an option. Concrete examples: anything webgl, image editing, games, even a simple curl app from yesterdays post (curlbuilder.com). Implementing curl app server-side would require double work which is against principles of progressive enhancement (or programming in general).
- lerouxb 12y agoSame thing applies to any content type. Images, CSS, video support, etc. Why pick on JS specifically?
- z1mm32m4n 12y agoIf an image fails to load, the browser draws a little box with some alternate text describing that box. If the CSS doesn't load, your text and content is displayed in a weird font without the grid layout you were using, but if you wrote your HTML semantically (using <h1> instead of <div class="title"> etc.), the browser can still show most of your content, and you can still move around on the page. If the JavaScript fails to load and you were using it to significantly alter the content on your page, for example loading a news article asynchronously, the entire page fails to load. I don't mean to pick on this app in particular (I actually think it's really cool and I plan on using it and learning from it), but take a look at what happens to http://hswolff.github.io/hn-ng2/ http://hswolff.github.io/hn-ng2/ when you switch off JavaScript--it's completely unusable. Now try switching off JavaScript on Hacker News--all the links and comments are still there.
- TheLoneWolfling 12y ago> If the JavaScript fails to load and you were using it to significantly alter the content on your page, for example loading a news article asynchronously, the entire page fails to load. Worse. Half the time the content is sent synchronously in the initial HTML, but keep hidden until a JS script has its way with it. Looking at you Markdown.js.
- moron4hire 12y agoI'm not sure I entirely agree that JavaScript should be developed in a Progressive Enhancement style, for two reasons: If you can live without it (the "progressive" part of progressive enhancement implies that the site is still usable without the JS), then I don't think you should be using JS at all. Semantic HTML and CSS are pretty amazing at adapting content fluidly and dynamically to a wide range of users and devices. Search engines expect documents to be laid out in a certain way. Web scrapers can add a whole pile of usefulness even to sites that don't create explicit public data APIs. You're going to have a serious hell of a time making it any better, and can easily make it a lot worse. And on the other hand, content sites aren't the be-all, end-all of the Web anymore. The Web is increasingly a deployment platform for applications, and there are a whole host of applications that just can't be done in the browser without JS. Luddites who complain about "but I got JS disabled" aren't the target market for an image-editor-in-the-browser. Failing to load JS at that point is just plain failure to load the application and no amount of Progresso Soup is going to help you. So yeah, I much prefer all or nothing.
- mariusz79 12y agoI am one of the "luddites". While it's becoming impossible now with all of that JS Overload, I would love to be able to go to a website with JS disabled, and read the text explaining why I should spend more time on the website and trust the website enough to enable JS or some other unnecessary (in the context of content consumption) plugin.
- mariusz79 12y ago> that just can't be done in the browser without JS. And that's fine. I don't think any one should complain when you open a webapp and it requires you to have JS enabled. The problem is that when I go to a website with JS disabled, I often don't get any messages, but blank or simply broken pages.
- scrollaway 12y agoThe web is trying to do two things at once right now: Be a platform for applications and be a medium for textual, document-like content. The former obviously needs a proper scripting language. The latter should definitely be built with progressive enhancement in mind because it's a good thing. Why this urge, on either side, to immediately apply their issues to an area which doesn't warrant it? Apps can't be progressively-enhanced without making things stupid. Documents shouldn't rely on javascript to be readable (in most cases).
- zupa-hu 12y agoWhile the point may be true, it's like don't drive a car because people do die in car accidents. The post is misleading as most of the cards present rare edge cases where JS doesn't work. Show percentages as well. Yes JS may not work 0.1% of the time. So let's fix it once all the higher priority issues are fixed.
- ant6n 12y agoThe comparison is not very good. There are plenty of arguments around not driving cars; safety is a valid concern.
- pharke 12y agoThat's in the same ballpark as saying there are plenty of reasons to not use fossil fuels or there are plenty of reasons to not use English as a lingua franca or plenty of reasons to not eat meat. There are lots of good reasons to not do any of those things but until you come up with a universally acceptable alternative and convince the majority of people to adopt it, you're shit out of luck.
- ant6n 12y agoAll three examples strike me as America centric.
- zupa-hu 12y agoxD
- M2Ys4U 12y agoYou're underestimating how often JS doesn't work by an order of magnitude. According to the UK GDS JS doesn't work for up to 1.1% of users.
- anc84 12y agoAre those human users or dumb bots?
- deleted 12y ago[deleted]
- leoedin 12y agoDid you even read the linked page? People turning off JS is one of 8 reasons given. In my experience (never turning off javascript) it's pretty reasonable. My work firewall sometimes blocks CDNs, so any website not serving their JS from their own domain may not load properly. I often browse on my phone on a train. Reception is patchy at best. You load websites during short windows of opportunity. Maybe you don't care about people who turn off javascript, but perhaps you should care about people at work and people on phones.
- mariusz79 12y agoMost people create websites to make money..either by selling their services directly or advertising themselves or someone else. Not building your website to support as many people as possible is like creating TV Ad that only works on TVs that support HD..
- yasth 12y agoActually a number of ads have content outside the bounding box for SD streams (though some SD streams now cut down things even more by letterboxing because of this). Ads were the first and still the most aggressive to have content strongly outside the 4:3 screen type. Because if you can create an effect that works it can be worth more than the whatever small number of users on SD, especially as those are likely out of demographic anyways.
- mariusz79 12y agoBut you can still see most of them.. But how many websites are broken when js does not load correctly for whatever reason?
- chriswarbo 12y agoUsing IE5 and Netscape Navigator as straw men to ridicule progressive enhancement completely misses the point! Progressive enhancement is about ignoring user agents. If you use PE, then you just-so-happen to get IE5 and NN support, but you also get support for Chrome, IE10, FF, Safari, mobiles, etc. If you don't follow PE, you're playing a high-stakes game of whack-a-mole: even if you only care about a few browsers, the combinatorial explosion of version/OS/screen-size/connection-speed/etc. configurations to keep track of can get ridiculous. If you miss out one combination, it can be game over: lost customers due to a white screen of death, or something equally unusable. You could keep pouring more effort into whacking moles, or you could reduce the stakes of the game. If your "game over" scenario consists of a product screen with images, description, reviews, a search box and an order form, but no hover-over zoom feature, it doesn't matter anywhere near as much. You no longer need to worry as much about missing a few configurations, and can focus on fixing bugs and adding features. The fact that it might also work on IE5 and NN is just a bonus; it's certainly not the point.
- serve_yay 12y agoSometimes HTTP requests don't finish successfully, so don't use JS. OK.
- donatj 12y agoI find more and more sites using JS for layout and it being an incredibly frustrating experience on my phone. The whole site loads and I'm reading the article for 4 or 5 seconds and then the js kicks in, scrolling locks, everything stops while The page redraws. On some sites, including Android Centeral of all things, this can stop me from reading text I ALREADY HAVE for upwards of 20 seconds while it reflows. Simply unacceptable. ALWAYS keep in mind that people are coming to your site for the text almost exclusively. If your stupid JavaScript interferes with the consumption of said text you have failed as a developer.
- protomyth 12y agoAt this point my mobile experience is go to website, read a couple of sentences, watch javascript muck with the layout as you describe, then a full screen popup wanting me to register or download the app, followed by a part of the top of the screen with a app store link for the app, then I get to read the article - maybe. I think we need something that is to websites as markdown is to word processor files.
- donatj 12y agoI'd like a browser that just removes all the CSS and JS and gives me simply the text, like Safaris reader mode, but without the need to ever leave it.
- Mithaldu 12y agoOn the desktop you can get that with Opera 12. It has a toggle to switch off CSS (and of course js) and you can make it a button next to the adress bar.
- chrisweekly 12y agoIt's not exactly what you described, but in my experience "Clearly" (https://evernote.com/clearly/ https://evernote.com/clearly/) does a v nice job delivering a clean, readable, stripped-down "just the text, please" version of a given page.
- 12y ago
- theDustRoom 12y agoWhy has this been voted up so much? It's dog shit.
- deleted 12y ago[deleted]
- clutterjoe 12y agoPeople browsing the web on a train while entering a tunnel, that's got to be at least 55% of all web traffic, no?
- dto-games 12y agoThe thin-client revolution is finally here, and what an awful pile of shit it is. Whatever happened to software that just works? Answer: Microsoft. Their legal team started the browser-as-OS delusion with their 1990s freakout about Netscape; this was an anti-consumer, anti-competitive lock-in strategy which now masquerades as a fundamental principle of Good Clean Living for people who give speeches about their startup's Beautiful, Human Responsive Javascript Libraries or their genius-revealing reimplementations of Emacs that can only edit one language (namely Javascript.) Hence today instead of having a computer, we have DMCA-hardened thin clients, and with each click we download what amounts to a freshly-coded never-debugged malware-infected EULA-wrapped software update; and when you enter a subway tunnel the whole universe stops working. Yet on the linked essay he likens turning off Javascript to removing the steering wheel from your car, which I find to be both idiotic and revealing: Your steering wheel doesn't stop working when your car goes into a tunnel. But you can see why a Googler thinks like this: Google makes a car with no steering wheel, which really might stop working properly when it loses signal in a tunnel. The real benefit of Thin Client is to the employment prospects of Javascript programmers, to the Google whose Android and browser and Javascript VM you will need to do anything useful or performant on Googlephones, and to the war criminals in technology, finance, and intelligence who carry out the destruction of human culture via airdrop of free surveillance-gathering Javascript phones, where Responsive Javascript libraries conspire with distant servers to jack up the valuations of this or that group of ten HN-darling companies, and hire three or four guys to make sure the top comment always defends Apple's weekly anti-competitive "this is what's best for consumers" move, or reminds users that There Is No Way To Prove This Isn't Another Tech Bubble. The whole concept of browser-as-OS has turned out to serve the permanent security state and other old-money beneficiaries of the Bronze Age kulturkampf. Thanks to the thin-client revolution and DMCA, secure software that actually WORKS is mostly illegal.
- 1971genocide 12y agohaha, that was a funny rant. You have expressed many problems with js clearly out. Is there a solution ? I do not see a better alternative, I didn't start programming in js out of spite. I tried to learn the old neckbeard C infrastructure formally and it seemed to be a mess. Even though I understand how most of it works, if you are trying to create products of value to people you really cannot use it. Hopefully my kids will experience a better experience with computers but for now js will do. <3
- tossaweigh 12y agoSee also: http://motherfuckingwebsite.com/ http://motherfuckingwebsite.com/
- kps 12y agohttp://bettermotherfuckingwebsite.com/ http://bettermotherfuckingwebsite.com/
- TheLoneWolfling 12y agoFirst thing I did, as I usually do with sites that have annoyingly small text width, was inspect element to increase contrast / width / remove the doublespacing. Then I read it. ...irony.
- larvaetron 12y agoI'm confused, is caching not a thing anymore?
- briandear 12y agoI don't think the usability of a site or load times should require caching. Caching should enhance, but it should not be a fundamental requirement to make a site not suck. Caching is salt and pepper but shouldn't be the steak.
- tomjen3 12y agoCorporate firewalls that block JS? Thats so stupid I don't doubt it is true.
- demarq 12y agoFirstly and this may suprise you you... We know you exist. Yes you with a tinfoil hat, you under a repressive corporate regime. You keep trying to make your presence known through ranty blog posts, angry comments thinking we dont know you exist. We know but we found that not only are you a minority but our lives as designers and developers are a million times easier if we just ignore you. Yes i know you want to surf with vim or IE6 but thats your choice. You make your bed now lie in it but dont drag the rest of us with you!
- vacri 12y agoRanty, angry comments? Pot. Kettle. Black. The lives of designers and developers are a million times easier if you just ignore accessibility requirements, too. But you know what? If you can't make a good design that caters to a variety of consumers, then you're not a good designer. Design is about melding form and utility, not just making something pretty. The less utility you have, the more you are an 'artist', and the less you are a 'designer'. Besides, if you don't care about anything but the most common, optimum user, you may as well return to the "This page best viewed at 800x600 on Netscape Navigator" '90s.
- chriswarbo 12y ago> You make your bed now lie in it but dont drag the rest of us with you! By taking an extreme position for the user, but not for the designer/developer, you're not making a fair comparison. In the same way that designers don't force all visitors to calibrate their monitor colours before opening the site in Photoshop, to be as "authentic" to the "experience" as possible; likewise those of us browsing in Emacs or whatever don't expect your Unity-powered Minecraft clone to work for us. What we do expect is that text-heavy, 'unavoidable' sites (eg. for governments, banks, etc.) aren't built inside Unity-powered Minecraft clones.
- StillBored 12y agoLazy, that is what I call it... In the past the rule was degrade gracefully if something keeps the JS from running. Now days its like "screw you, we can't be bothered to make it mostly work with css, so your out of luck if the JS didn't run". For me, I run with noscript. Most of the places I frequent (here for example!) work great without any JS, other places less so, but I can selectively enable what needs to run, and many times when I find those sites that simply don't work without javascript, I just click back, and ignore them. I don't trust sites that can't at least load some basic content to convince me they aren't just a malware vector.
- lucb1e 12y agoTen edge cases still makes for an edge case. It's a good to think about what we're doing but for all practical reasons, yes "Everyone has JavaScript, that's right!"
- ChikkaChiChi 12y agoDisappointing that the site links to a bunch of sources, except when it drops the knowledge bomb of "many" corporate firewalls blocking javascript.