Hacker News new | ask | show | jobs
by genericid 2880 days ago
Unfortunately Javascript-infested websites are a bit of an archival nightmare. Javascript can do pretty much anything it wants, it isn't consistent in that sense. You can't run them offline. Javascript in the browser is just a bad idea all around.
2 comments

You can generally "Save As..." and they tend to work just fine. Like any code which has network access, they can be dependent on various resources. I sometimes run a downloaded file through an insecure chrome instance (--disable-web-security and a unique --user-data-dir) with a catch-all service-worker. That'd probably not work with applets as they make their requests outside the browser AFAIK.

Also the security sandbox of Javascript is one of the best, if not the best. So it cannot do anything it wants.

> Like any code which has network access, they can be dependent on various resources.

Online resources. So you cannot run them offline.

Well sorry you can't use some chat app without internet connection, our bad.
Not everything is a chat application. But even a chat application can and should partially work without an internet connection: Reading old messages and composing new ones can work offline.
That has nothing to do with Javascript. If you use canonical, cacheable URIs for your requests, my method above works fine.

In my day job, I'm working on a CRM and sales system that is 100% web based and does work offline and is even offline-first (I love you Germany, but your mobile network sucks).

There may be many other problems with it but offline is mostly a solved problem in the web world.

Quick experiment: In a new Firefox profile, I opened a couple of websites [1]. Then I went offline and tried to load them again. Every time I just got the default "server not found" page of Firefox.

"Offline" is no more solved "not hijacking scrolling", "linkable URLs" and "not re-inventing <a href> badly".

[1]https://news.ycombinator.com/, https://www.google.com/, https://en.wikipedia.org, https://www.reddit.com/, https://www.nytimes.com

I don't see how this contradicts my point at all. This project is about saving Flash games, not Javascript.
> I don't see how this contradicts my point at all.

It doesn't, sorry for suggesting that.