문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top