Sunday, July 6, 2014

Cache controls for static files in iPlanet (Sun One Webserver)

Browser caching behavior is also subject to Web server settings for static file caching. Appropriate settings allow files that are rarely updated, such as image files, JavaScript files, or style sheet files, to be cached on the browser. Caching static files reduces network utilization and enhances Web Client response time.

  • we can enable the cache control for iplanet web server by adding  below tags in obj.conf file 


<If $path =~ "^(.*)(\\.)(jpg|jpeg|gif|png|js|css|woff)$">

      ObjectType fn="set-variable" insert-srvhdrs="Expires:$(httpdate($time + 64000))"
      ObjectType fn="set-cache-control" control="public,max-age=64000"

</If>
  • We can verify the Cache controls in web browser HTTP headers.







                                

3 comments:

  1. Ramprasad N.....thx for the informative article...we will implement the same.
    i have one doubt .. the cache control is same kind of static compression in iplanet to spped up the things?

    Yours,
    Amarnath
    Keep Smiling :)

    ReplyDelete
  2. Hi Amar,

    This configuration give instructions to web browser to cache the static files in browser cache and not to send the further requests to server until cache time expires.


    ReplyDelete
  3. Good Article Ramprasad

    ReplyDelete