PDA

View Full Version : How to reset a session variable in Opera?


edw
11-10-2004, 09:06 PM
I have an application which consists of a login window. After the user hits the Login button, I reset session variables, such as:
Session("user")=Request.Form("user")

It works fine in IE, Netscape, Mozilla, Firefox, Safari, but not Opera: if I login as user A and then as user B, the application still thinks I'm user B. However, if I login as user A, empty the disk cache in Preferences, and then login as user B, it works fine. What's interesting is that if I turn the cache off, it still doesn't work. How can I make it work so the user doesn't have to clear the cache every time? I tried Session.Abandon, but suprisingly it didn't work, besides it clears ALL my session variables whereas it is crucial for my app that I reset just some of them. I also tried disabling the cache programmatically:

<%
Response.CacheControl="no-cache"
Response.AddHeader "Pragma","no-cache"
Response.Expires=0
%>

but it didn't work either. That is so weird - clearing the cache works (I only did it manually), but disabling it doesn't.

edw
11-11-2004, 07:12 PM
I figured out the problem! The session variable was actually being set, but it wasn't passed the right way. I have three frames in my frameset, but I was passing user to only one of them. It turned out that I needed to pass it to all of them. I guess Opera is more strict than other browsers.