In XPages "use runtime optimized javascript and css resources" is a really cool feature because it joins all js files in just a file and all css files in just a css file.
However I noticed that the joined files are not cached (they always return status 200) and when you don't use "use runtime optimized javascript and css resources" they do (and return status 304).
Is good to reduce http requests but is bad always to retrieve from server the js and css files when they could be cached via ETag or Last-Modified http headers. Anybody knows if I'm missing something or if there is way to cache the joined files when you use the feature "use runtime optimized javascript and css resources" (application properties > XPages tab > Performance section > use runtime optimized javascript and css resources).
The runtime optimized resources are cached.
Here's an example:
If you are looking at the network activity and the response codes using Chrome Developer Tools, then make sure that it has not been set to "Disable cache (while DevTools is open)":
Pressing Enter in URL bar will respect the Expires
header and get the file from cache. But if you click reload or press F5 then the file will be reloaded. This is the behavior at least in Chrome and Firefox.
The cache works correctly when navigating from page to page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With