6 ms·
> Because in 10 years nothing you built today that depends on JS for the content will be available, visible, or archived anywhere on the web. What does that ev
by paxys 6y ago
> Because in 10 years nothing you built today that depends on JS for the content will be available, visible, or archived anywhere on the web.
What does that even mean? Saying browsers won't support JS in 10 years is an idiotic claim. Even more so considering it was written 5 years ago.
Beyond that, I don't know why people think that the web should just be either simple pages for serving content or massive desktop-class applications. There is an entire world between these two that is perfectly valid. Yes I want to host a blog but I also want it full of widgets and other fancy JS. I want to use new frameworks and rewrite it every few months. It may be messy, it may be sometimes inaccessible, and yes it may not be available a few years from now. But the web is and always has been about creativity and expressing yourself in any way you want. Heck my personal site ran on Flash once upon a time.
People here are the kind who would complain about geocities or myspace pages back in the day ("why is it all so flashy? Why can't it just be a simple page of text?")
- astrea 6y agoI'm sure they said the same about Flash.
- MaxBarraclough 6y agoI don't think anyone said that about Flash. Its closed nature was always known to be a significant drawback.
- GrumpyNl 6y agoThey said the same about PhP
- extheat 6y agoStill using php to this day, nothing wrong with it. Maybe the most painful thing is package management.
- aarmenaa 6y ago> Maybe the most painful thing is package management. Is Composer inadequate? Or maybe just not widely adopted by the community? I only used it for a short period of time several years ago.
- rightbyte 6y agoFlash and Java got stabbed in the back due to stricter security properties then JS. You can't do spying as easily with Java Applets etc. that the user need to approve to run manually.
- antonvs 6y agoFlash was a major malware injection vector, so its "stricter security properties" seem to have been misguided.
- rightbyte 6y agoYe they had their own set of problems. But I remember them as something that was "click to run".
- MaxBarraclough 6y agoFlash would generally run without asking, it was only click-to-run if you has a browser plugin like Flashblock.
- wizzwizz4 6y agoHeh. Tell that to Flash Cookies. https://www.cookiepro.com/knowledge/what-is-a-flash-cookie/ https://www.cookiepro.com/knowledge/what-is-a-flash-cookie/ > Many end users are unaware that Flash cookies exist and have no idea that when they delete their browser’s HTTP cookies, Flash cookies could remain unaffected and be used to recreate deleted HTTP cookies. The recreation process, which is called respawning, is extremely controversial because it facilitates cross-browser tracking and poses privacy concerns when the use of Flash cookies is not disclosed in a website’s privacy policy.
- rightbyte 6y agoI was a kid at the time but I remember I had to enable flash videos and games on a per website basis. Did flash or Java applets just run without the users explicit permission? Was the flash cookies added later on?
- tpxl 6y agoEvery third party library you link to is going to be down in 10 years.
- paxys 6y agoSo just bundle them into your own source? Depending on a third party server for your site to load is bad practice even today.
- s_gourichon 6y agoPerhaps it was simpler to not import all those problems in the first place. A website that shows content is not an app, and shouldn't pay all the complexity cost.
- wizzwizz4 6y agoWebsites don't show content. Websites are content; the browser shows them.
- Kaze404 6y agoGood thing we have open source, then :)
- aboringusername 6y agoWhat does "open source" mean in this context? In 50 years time I seriously doubt github.com will still be the same place it is today doing the same things. Maybe older protocols will die out, making accessing content over HTTP(S) impossible, maybe P2P will just break due to advances or newer stacks taking over. Maybe the "internet" will change in some fundamental way, and breakage is part of the "innovation" process. The way you write a comment on HN is likely to change over the course of decades, I doubt it'll still be the same HTML, HTTP, networking stack etc.
- Kaze404 6y ago
- amelius 6y agoWell, given all the quirks in browser compatibility I suppose it certainly can be painful to restore the software needed to run a JS-driven website that was written 5 or 10 years ago. It would help if software was more self-contained, or at least offered the option to be that. This has nothing to do with JS specifically, of course.
- colejohnson66 6y agoFrom what I’ve seen, most of the popular JS libraries (like React (or even old school jQuery)) are well aware of the quirks in browser implementations and use polyfills to fix it
- paxys 6y agoWhat quirks? There was a time when you had to essentially make different websites for IE, Chrome, Firefox etc. Even without JS, CSS layout and HTML tags were interpreted very differently by each one. Browsers have become a lot better at adhering to standards as time goes on.
- amelius 6y agoYes, but there is absolutely no guarantee that the browser will run a JS file from X years ago flawlessly.
- paxys 6y agoThere's also no guarantee that browsers will render HTML and CSS as it exists today in 10 years. Maybe all of the internet should just be ASCII text then (if there even is a guarantee of that)?
- amelius 6y agoWe should distribute software in a way such that its dependencies are completely described. So when we pull something from the internet (be it a JS file or some HTML), the system will know what other software to pull and it will just run. The current way of doing things works most of the time, but it is fundamentally flawed, which becomes apparent when viewing stuff from a decade ago.
- warpech 6y agoI read it as: Your stack is so complex that: - you will not have it running 10 years from now - I am not able to make a snapshot of the content using tools like curl
- deleted 6y ago[deleted]
- shadowgovt 6y agoWeird how the conclusion is that the sites are wrong, not that curl is an insufficient tool for indexing the modern web. Google search hasn't died because sites use JS.
- kortilla 6y agoBut it shouldn’t require such a complex js execution engine when the end result is something that is equivalent to what used to be retrievable with a simple curl request.
- progval 6y ago> Google search hasn't died because sites use JS. I believe it's the other way around. Websites use just as much JS as they can get away with, without sinking in Google results. If Google never ran JS in the first place, most websites wouldn't depend on it. And now every crawler has to keep up with Googlebot's computing power if they want to archive the web.
- core-questions 6y ago> Saying browsers won't support JS in 10 years is an idiotic claim. I think his reductionist take on it has resulted in you missing his point. Lemme take a shot at expanding on that for you. 1. Yes, browser will run JS in 10 years. However, in 10 years, the market will have changed. Firefox might be dead, and everything might standardize on a Chromium-derived monoculture. Backwards compatibility will be kept to a modest extent but we may see a new 'quirks mode' shift in the ecosystem or other attempts to carve off backwards compatibility. Look at how Apple uses this to their advantage to have internal agility, where MS uses the opposite approach and sacrifices it for stability. The former can eat the latter's lunch when it comes to technology on the cutting edge, even if the developer ecosystem and end user pays the price in subtle ways. If Google follows this lead with their monopolistic control of Chromium, we could easily have a world in 10 years where JS on a lot of sites that use it deeply, exploring the limits of the APIs, sites that already experience cross-browser compat issues, etc. will be slightly broken. The problem may only get worse over time; after all, we already have many use cases within IT to run a VM of Windows XP and IE 6 to access older devices that simply don't work any more with anything newer. If they'd been designed with simple, server-side frameworks and vanilla Web 1.0 stuff they would have aged a lot better. Isn't it possible that we're on the wrong evolutionary path here if that's the case? Think also of "applications" written in Node that you might want to run on your own server - it might not be possible to build them anymore, the dependencies might have dried up, making them difficult to rehydrate without doing extensive surgery. 2. Archival is another layer of the problem. If your single-page app doesn't present some mechanism where a scraper can meaningfully put in a URL and get back some amount of HTML reflecting the desired article / content / etc, it may not end up in the Wayback Machine or other archive sites, which are absolutely critical civilizational infrastructure if we want to have any hope at giving future historians anything even approaching a balanced and truthful perspective on this pivotal age. This is not an overstatement, and it's something people with all political beliefs should be able to agree with for their own reasons. Things that are published need to be retained, in ways that give us confidence their contents haven't been altered. If your site requires I execute a bunch of Javascript just to be able to see the content, then that is not guaranteed; even with a headless browser rendering the output, it's hard to know that what comes out the other end is actually a useful copy or not. Face it: Javascript is a third-tier language that occupies its position in the landscape due to first-mover advantage and inertia. Javascript frameworks paper over the fact that browsers weren't designed as application platforms by inserting gobs of difficult-to-understand code between developers and the actual underlying system. GUI things that worked trivially 20+ years ago are difficult and end up being omitted from most systems (you know, things like sortable tables, keyboard-accessible forms with complex controls, drag-and-drop, and other 90s gold). It's a big pile of trash.
- ben_w 6y agoI assume crawlers have improved since this was written, but: If the content is only visible when executing JS, then an archive crawler which does not execute JS will not archive it, and a search engine crawler will not index it. Another thing I may be out of date with: do people still link to 3rd party copies of JavaScript libraries? Because the left-pad npm package being deleted caused a lot of problems, and that kind of drift is inevitable over a decade.
- JoshTriplett 6y ago> do people still link to 3rd party copies of JavaScript libraries? Sadly yes. Occasionally, sites use Subresource Integrity (SRI, https://caniuse.com/subresource-integrity https://caniuse.com/subresource-integrity) hashes to ensure the scripts are identical to what they expect. But it still surprises me to see secure, sensitive sites loading third-party scripts.
- colejohnson66 6y agoWebpack is supposed to solve the inevitable “left-pad 2.0” problem. The downside is that each website serves their own copy of the libraries defeating cross domain caching (which browsers are starting to prevent anyways). It also requires setting up a build system. The upside of Webpack is that it does “tree shaking” which removes code that is never touched which makes the browser have to download less. Tradeoffs...
- ratww 6y agoActually Webpack has nothing to do with the left-pad issue, and it predates it. The original left-pad problem was due to it being deleted from NPM itself. It wasn't a package served by a CDN like jQuery. Its deletion from NPM prevented people from starting new projects or re-fetching dependencies, not websites from working. And the issue of CDNs being offline or deleting packages can be solved by vendoring dependencies, which is possible without Webpack and was already the common practice for more than a decade before using CDNs for dependencies became super popular.
- 6y ago
- afandian 6y agoIf you write real HTML then an archiver only has to retrieve the HTML in order to be able to save the a future-proof representation of the content. (Edit: I'm talking about text-first documents, not interactive webapps here). But if the content doesn't render at all without javascript, and if the archiver wants to index page or preserve it for posterity, it needs to retrieve all the external assets, and then execute them (because it may asychronously loads further scripts whith are required to load the content). And then wait for it all to execute. This means that archiving services need do to a lot more expensive work. It raises the bar to exclude smaller, more diverse web crawlers and indexers. And regardless of that, it's a big gamble to hope that the third-party CDNs that you rely on will continue to host exactly the same JS libraries ad infinitum.
- paxys 6y agoLots of different things being mixed up here. To archive a web page you need the source code, all assets, a layout engine and a JavaScript engine. Search engines and archival tools can handle all this very well today. Yes, if a site loads a ton of external content it has the potential to break. But that doesn't apply to just JS but also images and all other static assets. If a JS-heavy site is hosted completely from its own domain there's nothing stopping easy archival of it.
- afandian 6y agoWe're talking about mostly-text-pages which have no sensible reason to rely on JavaScript to render, not rich webapps. In these cases I consider the text to be a meaningful representation for the purposes of indexing or archive. I don't agree with this: > Search engines and archival tools can handle all this very well today. I think most developers have been in a situation where they had to explain to users that a moon on a stick isn't easy just because Google can do it. It may be commonplace, but it's not easy or cheap. The difference between real HTML and JS execution is orders of magnitude of time, expense, maintenance, and stuff to break. That really can't be underestimated. It's the difference between a 500 millisecond call to curl and a whole headless browser and a 5 second wait. I hope you don't think I'm putting this too strongly, but this raised bar is a force in the monopolisation and de-diversification of the web.
- TonyTrapp 6y agoWith all the deprecations currently happening in browsers (often driven by Google), I think it's not unrealistic to assume that we will see a whole bunch of JavaScript becoming deprecated and removed in browser engines in the next ten years.
- giantrobot 6y agoIf your "web page" is essentially just a script tag and relies on content through first and third party APIs it's going to be pretty difficult to keep that running long term. If an API shuts down, an incompatible change is pushed, or a JS CDN goes defunct in that JavaScript-only site breaks. JavaScript-only sites are pretty fragile. If the same content was just a normal HTML document it could at least be easily archived. It's also trivial to keep online. Even if some CDN dies and CSS or JS doesn't load it's still readable. JavaScript developers have never been great about progressive enhancement but it seems of late they've gotten worse. If the sole purpose of a site is to be an app then tons of JavaScript is necessary. But that's a minority of sites. A blog post or news article doesn't need to dynamically build the DOM with JavaScript and short circuit all of a browser's loading and rendering logic.
- figassis 6y agoNot everyone builds a site to immortalize content. Some are building businesses and trying to move fast. If an API can serve a website, mobile apps and desktop apps, then maybe that’s the only server I want, I move the rest to the client side. If in 10 years I’m still going, then I’ll keep the websites/apps available. If not, I likely will be too busy failing to care about content archiving. If keeping content on the internet was my goal, I’d build my site what way. But it’s not. Providing useful services is. I wonder if brick and mortar stores are worried about their place of business if they fail? Not likely. The internet is diverse, some things will be archived, some won’t.
- ht_th 6y ago> Not everyone builds a site to immortalize content. True, and that is fine. However, by using JS + APIs, we risk that others who want to immortalize content for purposes of historical or cultural research fail to capture quite a bit of our current culture and content. I would be sad if my grandchildren are unable to get a feel for the world I live in like I could get a feel for the world my grandparents lived in by means of archives, magazines, newspapers from their day.
- giantrobot 6y ago