Home

 

Instructing Web browsers to cache content

Configure IBM HTTP Server to cache static content such as images, style sheets, and JavaScriptâ„¢ code.


Ensure that you have mapped all the installed Lotus Connections features to IBM HTTP Server.

Improve performance on slow, high-latency networks by adjusting the expiry period on cached files that are associated with HTTP requests.

To instruct Web browsers and proxies to cache content...

  1. With a text editor, open the httpd.conf file from the ibm_http_server_root/conf

  2. Adjust the expiry period on cached files by adding the following rules:

      LoadModule expires_module modules/mod_expires.so ExpiresActive On
      
      <LocationMatch  /*/(nav|static|common/styles|images)/ >
        ExpiresByType application/x-javascript "access plus 1 day"
        ExpiresByType application/javascript "access plus 1 day"
        ExpiresByType text/javascript "access plus 1 day"
        ExpiresByType text/css "access plus 1 day"
        ExpiresByType text/plain "access plus 1 day"
        ExpiresByType text/xsl "access plus 1 day"
        ExpiresByType image/gif "access plus 1 day"
        ExpiresByType image/jpeg "access plus 1 day"
        ExpiresByType image/png "access plus 1 day"
        ExpiresByType image/bmp "access plus 1 day"
        ExpiresByType image/icon "access plus 1 day"
      </LocationMatch>
      

    These rules force the browser to cache static content by adding Expires and Cache-Control: max-age headers to static content.

  3. Save and close the file.

  4. Restart IBM HTTP Server.


Configure IBM HTTP Server


Previous topic:

Add certificates to IBM HTTP Server


Next topic:

Determining which files to compress

 

Related tasks

Map features to IBM HTTP Server

Required post-customization step


+

Search Tips   |   Advanced Search