6 ms·
Or just make a website that doesn't require javascript at all that loads instantly, uses almost no CPU/battery, and renders on everything everywhere and for peo
by superkuh 9y ago
Or just make a website that doesn't require javascript at all that loads instantly, uses almost no CPU/battery, and renders on everything everywhere and for people with accessibility issues.
- sp332 9y agoThat sounds great for a web page, but PWAs are more about being apps than about being web pages. Without JS you can't access location, camera, microphone, dialer, accelerometer, etc. Also it's difficult to preload a plain HTML page for offline use on a phone.
- pmoriarty 9y ago"Without JS you can't access location, camera, microphone, dialer, accelerometer, etc." That's not a bug, it's a feature.
- sp332 9y agoLet's take something very simple, like a guitar tuner. https://guitar-tuner.appspot.com/ https://guitar-tuner.appspot.com/ How are you going to implement that in plain HTML?
- deleted 9y ago[deleted]
- pmoriarty 9y agoDon't use web technologies to implement it. Make a native app. Javascript is a cancer that has lead to a slow, bloatware-, spyware-, and malware-infested web. Getting rid of it should be a priority.
- tenaciousDaniel 9y agoSerious question: in replace of what? A web that's just static content?
- pmoriarty 9y agoWhy not? What exactly is the big deal with having just static content? I don't have JS enabled when I read HN. I just hit reload to load and read new comments. What exactly is the problem with doing that? When I read some article on some news site or web forum, I don't need JS to just read a bunch of text or look at an image. All of that can be and often is static. JS is totally superflouous here. The only legitimate uses of JS I can think of are for things like games, or data that you really need to be updated in real-time like stock market tickers. But those are a relatively minor subset of the web and can be made in to standalone apps anyway. I'd much rather have a standalone app than expose myself to all the malware, spyware, and tracking that comes with a JS web ecosystem.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- krapp 9y ago>Why not? >What exactly is the big deal with having just static content? I don't read romance novels, so publishers shouldn't be allowed to print them. The problem is that your personal opinion on the legitimate utility of javascript doesn't have any value beyond your own browser, and the entire rest of the world has decided that a purely static web is not what it wants.
- tannhaeuser 9y ago> ... entire rest of the world ... Speak for yourself! I certainly agree with the parent that the Web is for content. And I believe many here around do as well. You do realize you're commenting here on a site which is as non-PWA/SPA as it gets, don't you?
- sp332 9y agoSo what's the advantage? It looks like all downside to me. From an app developer standpoint, I'd have to deal with multiple platforms and distributors. From a user standpoint, I'd have to hope the developer made the app available for my platform, and go through some install process before I got to use it. This way, it loads (with a cold cache) in half a second.
- pmoriarty 9y agoThe advantage for the user is that they don't have to open up their browser, computer, or mobile device to being exploited, spied upon, or advertised-to by an ocean of javascript garbage on the web. Their web browsing experience will be tremendously improved and streamlined. If they want a particular app, they can click to download and run it explicitly. It's not a big deal. From the developer and business standpoint, it might be a disadvantage not to have something like javascript available to use. It's more inconvenient, and now they can't spy on, advertise to, or track the user as easily. But I'm for a user-centric web, not a business-centric or developer-centric web.
- sp332 9y agoIf you click the link I posted above, you will get a permissions dialog that asks to access your microphone. You can say no upfront, or revoke permission at any time. It's not open to spying. Edit: to be specific, it's a lot easier to allow access temporarily in a browser than it is using the Android permissions system. Not sure about Apple but I'd bet it's about the same as Android.
- pmoriarty 9y agoJust because you've given permission to an app to access, say, your microphone, doesn't mean that it's not spying on you. That guitar-tuning app that was mentioned earlier might well be spying on you using the microphone it got access to. The guitar-tuning app is a special case that actually has a legitimate need to use a microphone, but I've seen countless apps that need all sorts of permissions that they don't legitimately need. Like calculator apps that need permission to access my microphone or contacts. The sad thing is that most users will just click through a popup asking for permissions, just like they do the "Run as administrator" popups on Windows. Such things are just not very effective safeguards. Even with limited permissions, allowing JS apps to run on my system opens me up to all sorts of JS exploits, tracking, and advertising that just aren't possible or much more difficult with static HTML (which has a much smaller attack surface than JS anyway).
- f2n 9y agoNative apps have led to slow, bloatware-, spyware-, and malware-infested mobile devices. The browser is a much better sandbox, giving much less permissions to the untrusted code.
- deleted 9y ago[deleted]
- eh78ssxv2f 9y ago> Don't use web technologies to implement it. Make a native app. > Javascript is a cancer that has lead to a slow, bloatware-, spyware-, and malware-infested web. Getting rid of it should be a priority. That may or may not be correct from developer's point of view. I am not sure and I am not going to argue that. However, how about user's point of view. A lot of users (including me!) prefer not to install native apps but use Web apps especially when achieving one-time tasks. Do you have any thoughts/data on what users prefer?
- tenaciousDaniel 9y agoThis is what I don't understand about the whole "create a website that can survive without JS" argument.
- mimsee 9y agoExactly. HTML was designed for sharing static documents. Now we want/need to do extensive client-side apps that can completely replace a desktop app.
- krapp 9y agoHTML at one point didn't even allow for image embedding, or tables, or external CSS. HTML evolves over time, and the <script> tag is no less a part of that evolution than any other tag.
- dozzie 9y ago...all that for a site that displays images with static description, like an on-line shop or a news site.
- CM30 9y agoI think this is really the key point here. Yes, use JavaScript when it's appropriate and makes the site/app better, or when it's necessary for the thing to function. Obviously something using your camera or microphone or what not should use JavaScript and might rely on it to function. But if the site or app is meant to do something that'd work perfectly fine without JavaScript (or with progressive enhancement and a non JavaScript fallback), make it like that instead. When you're delivering megabytes worth of scripts and relying on JavaScript only functionality for what's essentially a blog (read, many news sites and content platforms now), something is really wrong. The people at the likes of Reddit, Wikia, Medium, and a fair few news sites seem to be trying to deliver a simple product with enough technology to launch a space shuttle.
- c22 9y ago> Without JS you can't access location, camera, microphone, dialer, accelerometer, etc. Fine. Why would I want any thing on a website accessing any of those things? Why can't an app handle that? What's wrong with using separate mediums for publishing and interacting with information?
- sp332 9y agoIt is an app. The fact that it's also a web page is just an implementation detail. Being a web page makes it easier to distribute.
- c22 9y agoWhy not build a system for distributing apps that's distinct from pre-existing systems to distribute documents though? Presumably this is the goal of the App Store, and the very premise underlying smart phones. What has caused this model to fail? Why did I have to stop using my Symbian phone? It had a web browser.
- sp332 9y agoWe have app stores. They're gated, slow, fragmented, and sometimes expensive. They require apps to be installed before you can use them. (Google is working on this last point though.) And sure they have upsides too, but it's not the best option for everyone.
- krapp 9y agoFor one thing, because the vast majority of what people seem to consider "apps" are still documents (in that their primary purpose is to display formatted text) which use javascript. "webapps" in most cases are not distinct enough to warrant their own separate taxonomy. Also, because the web incorporates hyperlinks, which means "apps" can link to "documents" and vice versa, which is useful, because you might have an attached blog or FAQ or something.
- tracker1 9y agoBecause everyone already has a browser capable of doing that. Because every device/os has its' own app store/ecosystem. Because it takes a lot of effort (more than most will expend) to support even a handful of platforms with anything beyond the simplest of applications with native apps.
- hungerstrike 9y agoYeah and besides all of that stuff you can’t even have proper UI components without JavaScript.
- Theodeus 9y agoYes, this! And let's go back to DOS and mailing floppy disks to each others too. <3
- old-gregg 9y agoDOS and floppy disks are clearly inferior to modern operating systems and modern storage media. The described experience of "loads instantly, uses almost no CPU/battery, and renders on everything everywhere and for people with accessibility issues." is clearly superior to all javascript-powered web sites in the observable universe. Therefore your comment makes no sense, Sir.
- abritinthebay 9y agoJavascript powered applications are available across most devices - by default even - and across the world, and often work for quite outdated or cheap ones. The same is not true of native apps.
- Theodeus 9y agoApologies, my bad! It's so confusing being a Luddite in these days. I don't think I have a career ahead of me in the trolling business either.
- Theodeus 9y agoOn a serious note; I'm not sure why my comments get down voted? Are there guidelines against sarcasm, or is it just people with lots of karma that simply don't like that I like js?
- Theodeus 9y agoJust found the guidelines - I'd say the OP was wrong for posting flamebait and I was wrong for keeping that fire burning. And now I'm wrong for having commented on the voting on comments. My bad, again.