6

I'm unable to force a page to always expire in Safari. Chrome, IE and Firefox are good citizens but Safari is cruising along just fine with ignoring the following ASP.NET code:

// Expire immediately
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");

Any recommendations?

Keith Adler
  • 20,880
  • 28
  • 119
  • 189
  • 1
    I've found a hint to the problem here: http://www.projectseven.com/extensions/info/safaribbfix/index.htm. Apparently Safari doesn't treat the back button the same as other browsers. – Keith Adler Aug 02 '10 at 04:22

1 Answers1

7

Believe it or not, the way to make Safari always reload the page was simply to add this to the body tag:

onunload=""

I found a mention of this here: Is there a cross-browser onload event when clicking the back button?

Community
  • 1
  • 1
Keith Adler
  • 20,880
  • 28
  • 119
  • 189