开发者

Do external JS files get cached the same way images do?

开发者 https://www.devze.com 2023-01-15 15:55 出处:网络
If I have multiple pages that refer to a single pagehandler script,开发者_Python百科 will the script be called from the browser cache if I navigate from one of these pages to another?Yes. Here\'s a wo

If I have multiple pages that refer to a single pagehandler script,开发者_Python百科 will the script be called from the browser cache if I navigate from one of these pages to another?


Yes. Here's a workaround: When does browser automatically clear cache of external JavaScript file?


Yes. External javascript files can be cached in the same way as images.

Your server (apache, iis, etc) will need to be configured to send out the correct http headers to ensure the browser knows if/how to cache the assets.

0

精彩评论

暂无评论...
验证码 换一张
取 消