4 ms·
People can choose to avoid JS if they want, but a lot of users get a HUGE amount of value from JS. The web is an app delivery platform now, not just an informa
by osrec 4y ago
People can choose to avoid JS if they want, but a lot of users get a HUGE amount of value from JS.
The web is an app delivery platform now, not just an information delivery platform.
Plus, we have a lot of processing power on the client side, which should be utilised.
JS, when used well is not a bad thing. If a site uses it badly, just don't go to that site.
- AviationAtom 4y agoI think PWAs are the future. The industry is just slow at getting to it.
- robgibbons 4y agoIt's not that the industry is slow. It's just hard to push PWAs forward when Apple is actively hostile toward web apps.
- catiopatio 4y agoThe only people who truly want PWAs are web developers and product managers that do not prioritize their users. Why learn anything new or spend anything extra when you can just ship substandard web crapware to users who have no choice (looking at you, Slack).
- smhg 4y agoIsn't that like saying only big companies with specialized roles are allowed to provide app-like functionality? Among others, smaller shops and single-person companies surely benefit from one delivery platform if you ask me. Even if it's not perfect.
- chc 4y agoI don't see how it's like saying that. Do you think a single person can develop a PWA but a single person can't develop an Android app?
- sodapopcan 4y ago> The web is an app delivery platform now, not just an information delivery platform. No arguments there. > Plus, we have a lot of processing power on the client side, which should be utilised. I don't agree with the "should" here at all. Lots of the stuff is done on the client these days which could be done cheaper on the server. If I'm visiting a site that's developed as an application then I fully expect to running a bunch of JS, no qualms there. But there is no reason my phone should be forced to build a bunch of HTML just so I can read an article, and that's the problem: people are developing information sites as "apps". This is a large factor of why my phone can't hold a charge for a full day.
- MR4D 4y ago> people are developing information sites as "apps" This statement nails the problem that all of us suffer from. It’s like people have to add “feature” to make their site compelling because the information on it is not good enough.
- osrec 4y agoI would happily build a service that simply took all the JS heavy sites people visit and present them as basic HTML. Unfortunately, I don't think there'd be enough takers to make it a viable product. Information for free, without ads, is tough to do.
- thih9 4y ago> But there is no reason my phone should be forced to build a bunch of HTML just so I can read an article But the goal usually isn’t to let you read an article. Often the goal is to get you to read another article, click an ad, sign up for a newsletter, or buy a subscription. Apps can be good for all that.
- jibe 4y agoOriginal comment: users get a HUGE amount of value from JS You are correct here: the goal is to get you to read another article, click an ad, sign up for a newsletter, or buy a subscription But I think that contradicts the idea users get a lot of value from JS. You are correct, and
- 0x445442 4y agoThe web was an app delivery platform 20 years ago, at least that’s what the folks at Sun and Adobe tried to tell us. But then everyone pitched a collective fit and rejected injection of a runtime container into the browser. Now we have the current situation of an inferior technology and architecture being used as an app delivery platform. If one views a web browser as a proper platform for hosting applications I’d argue WASM and even the aforementioned tech (applets/flash) are superior.
- toomanydoubts 4y agoIn what ways are applets/flash superior to browser engines/JS? I really can't see it at all.
- 0x445442 4y agoIn the way I think IntellJ is a better application than attempting to rewrite IntellJ in JS and run it in the browser. This would hold for any number of applications. HTTP, HTML and the DOM were not designed to run rich applications. It’s been a continuous series of hacks to, IMO, solve a problem that was solved a year or two after this nonsense started. The problem was that of application delivery and updating. But iTunes quickly showed widely accepted software did not need to be distributed on physical media but could be installed and updated over the network.
- pwdisswordfisha 4y ago> Plus, we have a lot of processing power on the client side, which should be utilised. That does not mean it should be utilised by you. Have some humility as a developer.
- jxf 4y ago> Plus, we have a lot of processing power on the client side, which should be utilised. It would be one thing if this was a matter of consent. It isn't. It uses your resources without your permission. Leaving JS on is not permission to consume as much CPU as you want (otherwise, every website would also run a crypto miner). > If a site uses it badly, just don't go to that site. This sort of blitheness is very surprising to me. What if we're talking about a passport site, or an unemployment benefits site, and so on? Why is the onus on the user and not the developer?
- ornornor 4y agoWell said.
- googlryas 4y agoThere needs to be an API in the client for specifying how much CPU can be used. Clearly things like crypto mining in the bg are considered abuse but what about just poorly written js? Clients should be able to police the code they execute.
- osrec 4y agoThe choice is with the user. The onus is on the developer to build something good and efficient, otherwise people will not use the product. If the user is forced to use a terrible government website (as we all are from time to time), removing JS will fix absolutely nothing there. If anything, it might make things worse, as there will be a bunch of things you simply cannot do without JS (e.g cropping a photo to upload to a passport site - how would you even draw out the crop region without JS?!) JS is not the problem. Crappy developers and corrupt officials who award key contracts to crappy developers are the problem.
- speed_spread 4y agoIt's the ads that are the problem. A crappy website is sad but fixable. At least it provides some value. Ads are are a nuisance race to the bottom.
- chadlavi 4y agoDepends on what you're doing. Everyone uses the word "website" like it's just one type of thing. You DON'T need JavaScript for a website that has no interactability, like a personal blog with no comments or reactions features. You DO need it for... well, almost anything else you want to let the end user do. I think a lot of these "you don't need JS" things you see out there are either (a) a sensible reminder that your JS-filled app doesn't have to do EVERYTHING with JavaScript (looking at you, JSS), (b) a contrarian "JS sucks" take, (c) an appeal to use outdated tech like PHP instead, or (d) just a clever way of getting attention on sites like hackernews.
- jfoutz 4y agoIt’s funny you mention HN. With comments and voting and no js.
- Stratoscope 4y agoHow do you think HN handles voting and collapsing threads without a page load? It's this JavaScript that is loaded at the bottom of every page: https://news.ycombinator.com/hn.js https://news.ycombinator.com/hn.js There is a no-JS fallback. If you disable JS with uBlock Origin or whatever, then reload the page and try voting, you will see the page reload. But thread collapsing won't work at all.
- bobajeff 4y agoMy argument lately has been: Should we be allowing code to run inside of our documents? Am I okay with PDFs, jpegs, mp4s etc. running arbitrary code when I open them?
- jareklupinski 4y agoimo the extension is how we communicate the purpose of the contents: if it's a .js or .exe file, expect execution, and take appropriate precautions while media _shouldn't_ run arbitrary code, there's also nothing stopping a malicious actor from crafting something that breaks through a buffer overflow in the .mp4 codec for example the safest bet would probably be "assume anything can run arbitrary code, even if it's not supposed to"
- Stratoscope 4y agoPDF files can run JavaScript. It's used in a lot of fillable forms. https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsdevguide.pdf https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/... https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/...
- Dwedit 4y agoIt's still nice to make your page compatible with users who have Javascript turned off by default (noscript/umatrix). That way you can still use ancient HTML forms for server-side interactivity.
- andrepd 4y ago> Plus, we have a lot of processing power on the client side, which should be utilised. Preferrably in useful work. The fact that end user interfaces are sometimes slower than what they were in the late 90s suggests this is often not the case.
- deleted 4y ago[deleted]