Forum Discussion

Andrea_Knapp_28's avatar
Andrea_Knapp_28
Icon for Nimbostratus rankNimbostratus
Jun 19, 2008

Simple Cookie Insert Question

If I were to create a simple cookie insert IRULE as such:

 

 

when HTTP_RESPONSE {

 

HTTP::cookie insert name foo value boo

 

}

 

 

Would this always replace the same cookie even if I take different paths through the site? Or, would I need to specify the path for the cookie, so as to not create multiple cookies with the same name in users browsers which could fill the limit of cookies from a specific domain and potential push out valuable cookies such as the persitence cookie of the JSession cookie.

 

 

when HTTP_RESPONSE {

 

HTTP::cookie insert name foo value boo path /

 

}

 

 

Thanks,

 

Andrea
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    That should overwrite the cookie in question, but you may want to do a delete then an insert just to be sure.

     

     

    Colin
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    If you repeatedly set a cookie with the same name and value the browser will only store a single instance of the cookie. If the value changed over time or there were multiple instances of the same cookie with different values in a response, the browser would use only the last value. If the path or domain are unique then multiple instances of the cookie would be stored by the browser.

     

     

    Aaron