Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm not sure that this has been around long enough for there to be a widely agreed best practice, but I'll attempt to answer your questions.</p> <blockquote> <p>i.e. a user landing on the English page and then selecting Spanish would (re?) download the Spanish language URLs specified in the Spanish manifest.</p> </blockquote> <p>I believe, but can't currently confirm, that if you have files listed in both (say) the en.manifest and the es.manifest then only one copy of that file will be retained in the browser. So include all the shared files in each manifest, that way you don't have to worry about people hitting the home page first in order to get two manifests downloaded. As long as all your static content has far future expires headers the browser should populate the appcache with things from its local cache rather than fetching them again.</p> <blockquote> <p>Should I name the manifest file differently for the root page for each locale (e.g. en.manifest, es.manifest)?</p> </blockquote> <p>If there's lots of different languages there's no point making every visitor download every language specific file. So in that scenario you would want to have separate manifests for each language to have more fine grained control over what each user downloads.</p> <blockquote> <p>Or if I use the same named manifest on the root URL for each locale will it be re-read if the user changes to a page with a different locale (and a likely different sized manifest file - the webserver would specify not caching the manifest file(s))?</p> </blockquote> <p>The manifest will be re-read whenever it's been updated. This will cause the entire cache to be thrown away and re-downloaded. There's no getting around this, the best approach is not to update the manifest files very often.</p> <blockquote> <p>Or do I have to explicitly load the locale specific manifest via JavaScript if the user changes locales?</p> </blockquote> <p>As far as I'm aware you can't download a <em>different</em> manifest file with JavaScript, only the one associated with the page you're currently on by the <code>manifest</code> attribute.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload