简体   繁体   中英

AppCache 'miss' when file is loaded from remote domain in script?

We use Appcache of our SubToMe button.

The benefit of loading the code once from the server and then keeping everything in the user browser is exactly what we want and it works grear. By loading in Chrome, you'll see in the dev console that all files are loaded the first time, and if you refresh that no other file is ever loaded.

However, the button is meant to be loaded form other sites like on a blog . The html button has a onclick listener which will just add a script element with an src point to https://www.subtome.com/load.js . For some reason, this file is not loaded via Appcache, even though it is in the manifest and if you get it directly (by putting its url in the browser bar), then it is fetched from AppCache.

Anyone knows how we can force the browsers to use the Appcache version when loaded from a 3rd party site? Or is that not possible with Appcache.

"Over SSL, all resources in the manifest must respect the same-origin policy."

See http://appcachefacts.info

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM