I’m writing a control panel for users in my project, I have a DIV element and load user situation in that with $('.user-situation').load('userpanel.asp').
I have a modal login form and it send data to authenticate page in json:
$.getJSON("authenticate.asp?U=u.val()"+"&P=p.val()"+"&format=json&jsoncallback=?", function(data){
if(data.Status == "Successful"){
$('.user-situation').load('userpanel.asp');
}
});
in authenticate page i set some session and one of them is Session("ID")
As you can see i reload the userpanel.asp in my div after successful login, because i want to show user options there.
userpanel.asp code is like this ( simplified )
if Session("ID")= "" then
Response.Write ("You must log in to using of site options")
else
Response.Write (" some options write here ")
end if
this works perfectly in FF and Chrome and Opera
But in IE (9) when page refresh after successful login, userpanel.asp show me first condition result!!
why?! where is my fault?!
It is probably caching the initial page result. (IE is always trying to be smarter than all of us… and fails.)
I suggest salting the query string with a unique number that will always be different when the page reloads. Try:
Anyway, that will make the browser think you’ve never seen this URL before, which will solve the problem if it is a caching issue.