Pergunta

I want to cache javascript libraries and other static assets - but no HTML whatsoever.

I was under the impression

CACHE MANIFEST

somefiles.js
somemorefiles.js

NETWORK:
*

Would do the job. It caches the html anyway. Please advise.

Foi útil?

Solução

The HTML page containing the reference to the cache manifest is always added to the cache. See the specs.

Note: Authors are encouraged to include the main page in the manifest also, but in practice the page that referenced the manifest is automatically cached even if it isn't explicitly mentioned.

Outras dicas

You can create a hidden iframe with a reference to page with a manifest. Then remove the manifest from your HTML page that you don't want to be cached.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top