10 ms·
This has all its place on hacker news because it is a fun hack, but it's not at all practical. Not only it doesn't work in all browsers even fairly recent ones
by p4bl0 5y ago
This has all its place on hacker news because it is a fun hack, but it's not at all practical. Not only it doesn't work in all browsers even fairly recent ones (service workers), but even when it works it necessitates javascript enabled, and imposes a non negligible additional load time. And more importantly, with the way it is recommended to use it using 404.html file as a "catch all", it means all your pages are served as 404 errors, which can be a problem for a lot of things (starting with search engine indexing).
- dewey 5y ago> but even when it works it necessitates javascript enabled I think you are overestimating the number of people who have JS disabled outside of this website.
- JCVI-syn10 5y agoI've never worked on an enterprise-level site where there were greater than 1% of users with JS disabled or a percentage to make a dent in conversions
- BiteCode_dev 5y agoYes, but as you said it's fun, and it would actually be practical if you'd put the unpacking server side, as a way to save hard drive space. Or with a cli tool. It could even shard the content among several images as well, or create a FUSE driver for it. Combine it with webtorrent or a p2p webrtc cdn for additional coolness.
- speedgoose 5y agoRequiring javascript is fine in my opinion. Almost everyone has javascript enabled. And the few power users without javascript will enable it if they want to.
- oefrha 5y ago> with the way it is recommended to use it using 404.html file as a "catch all", it means all your pages are served as 404 errors That's due to GitHub Pages not having any rewrite mechanism other than the 404.html hack. You can host the same thing on Netlify/Vercel/any other host with proper rewrite support, including a server of your own, and not have this problem.
- YetAnotherNick 5y ago> Not only it doesn't work in all browsers even fairly recent ones https://caniuse.com/serviceworkers https://caniuse.com/serviceworkers It works on 96% of user's browser.
- pjmlp 5y agoApparently the demo doesn't work on Firefox 92 incognito mode, so.
- lelandfe 5y agohttps://bugzilla.mozilla.org/show_bug.cgi?id=1320796 https://bugzilla.mozilla.org/show_bug.cgi?id=1320796 > Service workers are disabled in private browsing mode because they are impossible to use without setting up state tied to the origin and URL scope. This inherently requires writing to disk. Had no idea this wasn't permitted.
- pjmlp 5y agoThanks for pointing the ticket, I also wasn't aware of it.
- Dylan16807 5y ago> The tentative plan is indeed to use temporary disk storage that's encrypted so that in the event of a browser crash the data will remain unreadable. We're starting with IndexedDB support for this mode of operation and bug 1639542 is the meta-bug for that. This is a longer term effort. Well that's a start.
- deleted 5y ago[deleted]
- kashug 5y agoI often see people speak about requiring users to have JS enabled as a problem. But is that really an issue? I remember 5-10 years ago I would use things like no-script to disable javascript, and only enable on specific sites. But with the way modern frontends are, I would expect most website to not work at all if I disabled JS. So I would expect most users to have JS enabled anyway. I can't remember the last time I created a website in a professional setting that would work without JS. Everything is written in things like React, Angular and Vue.js these days. And that seems to be the case for most modern websites. Atleast things made here in Oslo.
- hetspookjee 5y agoI often browse the internet through Firefox Focus with JavaScript disabled and the web is a breeze and really fast. Additionally it helps in escaping paywall s for most news sites.
- simion314 5y agoIf the website is a blog post, or some news it should work without JS, You don't need an SPA to show some rich text. I use Vivaldi because it makes easy to have JS off by default and enable for each website that really needs it. (I do not know if Chrome/Chromium made this thing easy too)
- amelius 5y ago> I use Vivaldi because it makes easy to have JS off by default and enable for each website that really needs it. So you fill in this entire form, hit submit, and then find out that you really needed JS and now you have to fill in the form all over again. How is that easy?
- simion314 5y agoI am a developer, I can guess what site needs JS, like payment sites, sites that are actually SPAs. Check all submissions from HN and let me know how many have forms , load fine without JS and don't complain that JS is off and then fail on submit? It is easy because I don't get popups for cookies, for allowing location access, no fancy scroll effects , I also disabled animated GIFs. If you are a webdev and you don't work on an SPA but for some reason you site is half broken with JS off then use the standards and put a message that informs the user that JS is required. I would not setup this to some random person computer, ad blockers too can screw with shopping carts and some websites also beg to stop the ad blocker , so I would not install ad blockers too any random person either, but here on HN JS off by default is a good advice, most should understand that if page is blank or some button does nothing then it might be a JS related issue.
- jstummbillig 5y ago> This has all its place on hacker news because it is a fun hack, but it's not at all practical. No shit.
- endless1234 5y agoIt's a fun project decoding a png image clientside. How do you propose it should be done without javascript? How does SEO make any difference - it's clearly a toy project, proof of concept, not meant for real world use.
- jordache 5y ago_____ requires a browser, so it's less resilient than a solution without a browser dependency.
- bogwog 5y agoExcept for the SEO issues, everything else sounds like modern web stuff.
- asdfasgasdgasdg 5y agoUsage-relative, it seems reasonably ok to rely on service workers. Something like 96% of browsers-by-usage have access to them. And probably most of those few users who use an incompatible browser can switch to a compatible one.