I’m testing with https://www.webpagetest.org and some questions arise me about some issues about cache control mode on static assets
Leverage browser caching of static assets
FAILED – (No max-age or expires) – http://[domain].com/wisej.wx
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/init?_sc=….
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/wisej.min.css?v=…
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/Wisej.Web/qx.min.js?v=…
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/wisej.min.js?v=…
FAILED – (No max-age or expires) – http://[domain].com/app.wx?_sc=…
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/Wisej.Ext.FontAwesome/sign-in.svg
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/Wisej.Ext.FontAwesome/user.svg
FAILED – (No max-age or expires) – http://[domain].com/resource.wx/Wisej.Ext.FontAwesome/lock.svg
Thanks in advance!
I didn’t realize the etag method falls back on the server. I added relevant file extensions to IIS Output caching, however, I can’t get the .qs.js or wisej.js file to cache on IIS, because the extension is followed by a version number (ie, qx.js?v=22.214.171.124 )
The other file extensions with no ? after it work fine.
I tried the “Cache different versions of a file based on query string variables” and entered * as a wildcard, but it didn’t work.
Wisej caches all static and also all dynamic content. We use Etag instead of max-age. The old way of caching using max-age forces a resource that has not changed to be reloaded after the max-age, or it serves stale content when a resource has changed before the max-age, or it forces the site to use cache buster links that you have to manually change everytime or receive stale content. Browsers cache using the full URL as the key. When wisej.js or cool-image.png changes and the site uses max-age you have to manually delete the cache on the browser or you have to change the URL. The newer Etag mehod of caching allows the server to decide when a resource is stale and it guarantees that the served content is always up to date.
wisej.wx is a small bootstrapper that may change. It’s cached until changed.
/init is a payload that may also change. Also cached until changed.
/app.wx is the ajax request URL which obviously cannot be cached.
/wisej.js or /wisej.min.js is a bundle that is dynamically created for each application on first use (and cached using Etag).
/qx.js or qx.min.js is the basic library which also may change. Cached as well using Etag.
The same goes for images in icon packs or served by the app. All cached.
Wisej also pre-compresses (gzip) the scripts and bundles so that the server doesn’t have to compress on every request. They are all cached in /temp.
Check using The Network tab with dev tools. You’ll see the Etag and the 304 response.
I don’t quite understand the question. Can you elaborate on the issues you mention?
Please login first to submit.