Skip to main content
August 17, 2012
Question

Preventing cached page history from being visible

  • August 17, 2012
  • 1 reply
  • 2116 views

I am working on site where potentially two different users could login to the same browser without it having been closed.

This can allow the second user to use the back button and see cached pages belonging to the first user. I can't find a way of preventing the second user from seeing the previous users cached history.

I know it is possible, what is the best way to achieve this? 

This topic has been closed for replies.

1 reply

August 17, 2012
Known Participant
August 21, 2012

Here are some headers that I usually throw on any page where I do not want to cache

<cfheader name="expires" value="#now()#">

<cfheader name="pragma" value="no-cache">

<cfheader name="cache-control" value="no-cache, no-store, must-revalidate">

August 21, 2012

Thanks for your answers, very useful.

From what I understand Mike, this approach doesn't work in all browsers, is that correct?  I have tried similar approaches and they didn't work for me.