Closed TzviyaSiegman closed 6 years ago
Using a script to load resources and scripts would be (and is often now) considered an anti-pattern that limits the ability of the browsers to help developers. Things like <script type="module">
and the like are in the works precisely to keep developers from falling into JS-only mode.
It seems safe to say that "deterministic offline caching" will do what it can based on the spec we right, but if developers Do It Wrong their apps (and more importantly their users!) will suffer the consequences.
Also, Chrom(ium) is working on a new "offliner" system to replace (or rather enhance for limited space/processing scenarios) the current rel="prerender"
based system it's using now.
Here's the conversation about the new system.
And some of the code they're moving toward.
Certainly it would be worth connecting with some of these developers to see where things overlap in our ideal world and what they have on hand now.
I confess I don't understand how all resources can be cached. If the needed resource is dependent on user interaction, for example, you can't know what it is until the user interacts with the interface. There might also be context-dependent ways of calling such a resource that can't all be represented in a manifest. All you can know in some cases is the script that will be called, not what it will call.
And I don't know that we need to optimize web publications in a way browsers don't. If a script has no value offline, it seems like that should probably be a property that HTML defines for the script element, as dropping the file from the cache doesn't remove the element from the DOM. We'd only be "optimizing" one side of the problem.
@BigBlueHat
Using a script to load resources and scripts would be (and is often now) considered an anti-pattern that limits the ability of the browsers to help developers. Things like Githubissues.
Githubissues is a development platform for aggregating issues.
from https://github.com/w3c/wpub/issues/15#issuecomment-320729321 by @bduga
To be discussed: which resources should be listed in manifest