Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.4.2
-
Component/s: Webjar
-
Labels:None
-
Tests:Unit
-
Development Priority:High
-
Difficulty:Easy
-
Documentation in Release Notes:
-
Similar issues:
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
-