Details
-
Improvement
-
Resolution: Fixed
-
Major
-
6.4.2
-
None
Description
Since XWIKI-11056 we return 304 Not Modified which means the browser still has to make a request to check if there is a newer version of the file. I think we can safely cache the WebJar resources permanently because the WebJar version is included in the URL:
/xwiki/bin/webjars/resources/path?value=requirejs%2F2.1.15%2Frequire.min.js
So when we upgrade a WebJar dependency the URL will change and thus the browser will request the new version. Note that the version from the URL is normally detected automatically:
$services.webjar.url('requirejs', 'require.min.js')
For permanent caching we can use the same HTTP header as the JSX action.
Attachments
Issue Links
- is related to
-
XWIKI-11056 webjar resources are not cached on browser side
- Closed