Forum Discussion

Jask2002_40661's avatar
Jask2002_40661
Icon for Nimbostratus rankNimbostratus
Oct 08, 2012

iRule to add Cache-Control:Public for files download issue over ssl

For the problem of pdf/excel/doc file download over HTTPS and IE issue

 

following article says create a irule to add Cache-Control:Public

 

http://support.f5.com/kb/en-us/solu...r=22662958

 

If I create the above rule this would be applicable

 

for ALL HTTP responses (be it for dynamic aspx / php/ jsp / static ) .

 

That should be problematic for dynamic content . right ?

 

SHould that rule be only created for static file types(pdf,exl,doc) in question ? Please help

 

3 Replies

  • A data group might be better for performance but try something like this;

    
    when HTTP_RESPONSE {
       if { [HTTP::header value Content-Type] contains "application/pdf" } {
        HTTP::header replace Pragma public
        HTTP::header replace Cache-Control public }
       elseif { [HTTP::header value Content-Type] contains "application/vnd.ms-excel" } {
        HTTP::header replace Pragma public
        HTTP::header replace Cache-Control public }
       elseif { [HTTP::header value Content-Type] contains "application/msword" } {
        HTTP::header replace Pragma public
        HTTP::header replace Cache-Control public }
       else { return }
       }
    

  • Sure, because I have stock ticker website (ASPX) , now if F5 is adding cache-control:public to ALL the requests (dynamic + static).

     

    my users see stale data on my aspx page (which is dynamic page)

     

     

    Is there a way to request for modiification of that article with the correct iRule code

     

     

    http://support.f5.com/kb/en-us/solutions/public/8000/000/sol8093.html?sr=22662958

     

     

    So that people like my does not suffer
  • Understood. You could use the comment area at the bottom of that article to request it is updated but of course, every users needs are different so typically the minimum code needed to resolve an issue is listed and you are expected to build/code your requirements around F5's 'starting point'.