简体   繁体   中英

How to ensure the Angular2/4 frontend always get the updated html, css and js hosted in IIS?

In IIS, there are a few settings related to the freshness of files

  1. Output Caching, and add a few cache rule. for example, check Kernel-mode caching and using file change notifications.

  2. HTTP Response Headers. Set Common HTTP Response Headers, and set Expire Web content. I guess this is not good for NG Websites.

And I also set versioning queries like my.js?v170509.13, and use compiler.clearCache().

Is this enough or too much or not enough to ensure the Angular2/4 frontend always get the updated html, css and js hosted in IIS?

And also, occasionally, Google Chrome in Windows could not pickup the updated js, while Firefox and IE could. Anything special with Chrome?

set versioning queries like my.js?v170509.13,

This is pretty much all you need.

Anything special with Chrome

As long as the version numbers are different there should be no problems.

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