Building an Offline Page for Theguardian.com(theguardian.com)
theguardian.com
Building an Offline Page for Theguardian.com
https://www.theguardian.com/info/developer-blog/2015/nov/04/building-an-offline-page-for-theguardiancom
12 comments
Service workers have been around for a while. As far as I know their capabilities are restricted to the domain that includes them. So the guardian website can only intercept network requests made from itself.
Well, just goes to show you how out of date I am!
Though after reading up on it, I still don't like it much. It makes the web behave in ways I don't expect it to and I don't really see why anyone would really need this, unless they want to fundamentally change the way the web is expected to work.
It's main usecase is for making web apps work offline. This allows you to "install" a web app rather than a full-blown native app. If iOS supported it properly, then you could have truly cross platform, sandboxed mobile apps.
There used to be a declarative version AppCache, but in pracrice that made cache invalidation almost impossible to manage properly.
There used to be a declarative version AppCache, but in pracrice that made cache invalidation almost impossible to manage properly.
You can check "about:serviceworkers" on Firefox, and see how many sites install a worker when visiting their page. Spoilers: a whole lot of them
It can't do whatever it wants. It can make responses for requests that would go to that particular website without actually making the request, that's it - that is, the website can provide some code that makes local responses on its behalf for things it could respond to anyway. It can't intercept (or even see) anything for other sites. That's a significant difference from installing executable code in the form of a standalone binary.
I do agree, more broadly, that there's a place in this world for a s web-like thing that only lets sites provide text and minimal formatting and doesn't let them run any code at all, even in a constrained/sandboxed environment. (https://gemini.circumlunar.space/ seems like the most promising thing in this space.) But the web hasn't been that since 1995 when they released LiveScript.
I do agree, more broadly, that there's a place in this world for a s web-like thing that only lets sites provide text and minimal formatting and doesn't let them run any code at all, even in a constrained/sandboxed environment. (https://gemini.circumlunar.space/ seems like the most promising thing in this space.) But the web hasn't been that since 1995 when they released LiveScript.
There's also the original pre-web Gopher protocol, which has been getting a lot more users since being mentioned on HN a few weeks ago together with Gemini. Gopher seems to appeal to people who like retro-computing - the TLS requirement of Gemini rules out even older Macs, nevermind the Apple IIs and Commodore 64s that can still access Gopher.
For anyone curious, Phetch is a really good terminal-based browser for Gopher written in Rust [1], and Jaruzel's Gopher Browser For Windows is a very easy to use GUI browser that also supports image files. Both are under 1MB. (If you're running Haiku OS, Gopher is still built-in to the default WebPositive browser.)
[1] https://github.com/xvxx/phetch
[2] http://www.jaruzel.com/gopher/gopher-client-browser-for-wind...
For anyone curious, Phetch is a really good terminal-based browser for Gopher written in Rust [1], and Jaruzel's Gopher Browser For Windows is a very easy to use GUI browser that also supports image files. Both are under 1MB. (If you're running Haiku OS, Gopher is still built-in to the default WebPositive browser.)
[1] https://github.com/xvxx/phetch
[2] http://www.jaruzel.com/gopher/gopher-client-browser-for-wind...
Old 2015
I've been reading an offline version of the guardian for my whole life, it's pretty nifty.
If you clear your cache while your Internet connection is off, this won't work.
I am not surprised by Chrome doing something like this. But firefox too? I hope this will be opt-in.