HEBorn
HEBorn copied to clipboard
index.html should not be cached
We can heavily cache both app-[hash].{js,css}, but index.html should always be fetched from origin, so it returns a new hash in case app.js/css has changed. Index.html is quite small anyway, it represents less than 1% of the total page size.
Not sure if it's being cached by nginx or cloudflare or both.
Caching mode is passed through the HTTP header, so probably you should check the webserver. If I'm not wrong, cloudflare should only pass their personal cache when there is no response from the server...
Yep, solution is to simply set cachecontrol header to no-cache and properly change the ETag every time the underlying file changes.
@renatomassaro pls add this config to NGINX and close this issue
add_header Cache-Control no-cache;
expires 1s;
proxy_no_cache 1;
proxy_cache_bypass 1;