Forum Discussion

Srinivasan_G_31's avatar
Srinivasan_G_31
Icon for Nimbostratus rankNimbostratus
Nov 15, 2012

What this iRule does?

Hi,

 

Would like to know what the following iRule accomplish.

 

 

when HTTP_RESPONSE {

 

HTTP::header replace Pragma public

 

HTTP::header replace Cache-Control public

 

}

 

 

Srini

 

 

5 Replies

  • Those commands inject/replace the Pragma and Cache-Control headers in the HTTP response to the client, effectively replacing whatever cache controls are being sent by the server (if any). The 'public' designation tells the client browser (and in-path proxies) that the page may be cached.
  • Quite the opposite. It replaces the header values so that ALL content is cached by proxys, caches and client browsers; regardless of what the origin server has specified.
  • I'd only use that iRule on a virtual server that load balances web servers that only serve static content. You're asking for trouble if there's any user-specific content that you're forcing caching on.

     

     

    Aaron