views:

343

answers:

4

We have a strange problem in Safari. When the user logs out of our Web Application we expire the forms authentication with the following

 FormsAuthentication.SignOut();
 Session.Abandon();

This works fine in IE and Firefox (when the user hits the back button they are presented with a page expired message and are forced to login) but in Safari the last page the user was working on shows up. I tried many of the suggested thinks like setting the Response.Expires but nothing helps , Has anyone faced this problem ? Do u have any suggestion / workarounds ?

Thanks

+1  A: 

Are you sure the page isn't just cached on the browser?

Have you tried hitting the back button, and then clicking on some links? Does it prompt you to log in?

It sounds like browser caching to me.

Perhaps you could try:

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

I'm not entirely sure that is going to work, however.

Joseph
Yes ,when i click on the links the postback occurs and the user is forced to login. It looks like browser caching. but how do i prevent this ?
Hidayath
A: 

Are you using Safari 4 beta? If so, I've had this same problem. Not sure what's causing it, although I assume mishandling cookie destruction.

lush
Not the beta, i am using the version 3.2 ( this problem was present in the older versions too)
Hidayath
A: 

Sounds like Safari is displaying a cached copy of the page.

You might want to read Disabling browser caching for all browsers from ASP.NET

Shawn Miller
Hi I tried all these things , but Safari seems to ignore all these settings.
Hidayath
I'm running into the same problem with Safari 4 (Windows and Mac), I have tried all of the usual tricks to disable caching in the browser and Safari is ignoring all of them. Has any one had any luck solving this issue.
lucasweb
A: 

i tried contacting apple, no answer so far. the issue persists.

in the mean time (for your testing only - and possibly as a recommendation to your users): go to DEVELOP > DISABLE CACHES and it should now work as expected.

b0x0rz