Changes for page WebJars API
Last modified by Admin on 2024/03/28 10:52
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. Admin1 +xwiki:XWiki.mflorea
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -35,6 +35,16 @@ 35 35 {{/code}} 36 36 ))) 37 37 38 += Caching = 39 + 40 +It is very important for the WebJar resources to be cached by the browser as this helps reducing the page loading time. Here's the history regarding caching support for Webjars in XWiki: 41 + 42 +* Between 6.0M1 and 6.2.1 / 6.3M1 the WebJar resources were not cached at all. This means that each time you reloaded a page that was using WebJars, the resources from the WebJars were requested again from the server. 43 +* Between 6.2.1 / 6.3M1 and 6.4.3 / 7.0RC1 the WebJar resources were partially cached. The browser is still making a new request for each resource that is being used but passing the 'If-Modified-Since' header which makes the server return a 304 Not Modified (empty) response, which is faster than sending the resource back again. 44 +* Starting with 6.4.3 / 7.0RC1 the WebJar resources that are static (e.g. no Velocity code) are cached permanently. The browser won't make a new request to get the resource unless: 45 +** You clear the browser cache or force reload the page (Ctrl + F5) 46 +** You reload the page using F5. In this case the browser will send a request with 'If-Modified-Since' header and the server will responde with an empty 304 Not Modified. 47 + 38 38 = Examples = 39 39 40 40 Here's an example of the [[AngularJS Todo Application>>https://github.com/xwiki-contrib/application-angular-todo]] which uses this WebJars integration module.