Changes between Initial Version and Version 1 of Documentation/NewbieGuide/Caching


Ignore:
Timestamp:
03/18/18 07:33:04 (2 years ago)
Author:
gogo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/NewbieGuide/Caching

    v1 v1  
     1= Caching Xinha = 
     2 
     3Xinha use involves the browser loading a fairly large number of files from the web server, it is in your interest to assist the browser in not requesting these seldom changed files. 
     4 
     5For Apache users, a set of caching directives like this in a `.htaccess` file (eg `/path/to/xinha/.htaccess`) is a good idea... 
     6 
     7{{{ 
     8<IfModule mod_expires.c> 
     9  ExpiresActive On 
     10  ExpiresByType image/gif        "access plus 24 hour" 
     11  ExpiresByType image/jpg        "access plus 24 hour" 
     12  ExpiresByType image/jpeg       "access plus 24 hour" 
     13  ExpiresByType image/png        "access plus 24 hour" 
     14  ExpiresByType application/javascript       "access plus 24 hour" 
     15  ExpiresByType text/css         "access plus 24 hour" 
     16  ExpiresByType application/xml  "access plus 24 hour" 
     17</IfModule> 
     18}}} 
     19 
     20If course you can make the time longer, or shorter, the point is your Xinha files are unlikely to change any time soon so you might as well make it cache for a long time. 
     21 
     22If "ease of transition" is a concern (that is when you upgrade Xinha you don't want your clients to be troubled with caching) then name your xinha directory with the version, eg instead of /xinha/XinhaEasy.js` have `/xinha-1.5/XinhaEasy.js` then you won't have that issue will you.