 |
|
 |
Thank u,for your good explanation helped me a lot.
|
|
|
|
 |
|
|
 |
|
 |
If u just handle session is engough to prevent back button in IE but even ur code is not working in Mozilla Firox. Pls check n if u get solution pls frop mail to kriish05@yahoo.com.
Thanking you
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
not working even with internet explorer
|
|
|
|
 |
|
 |
It wont works on Firefox.....
|
|
|
|
 |
|
 |
This is a good and usefull article... Thanks..
|
|
|
|
 |
|
 |
Hi Experts,
I m working on my website which have facility to create user accounts.
As any user logged in to system, Session Variables also created and maintaind
for further use and for authentication purpos offcourse..!
Now My problem is When the user LOGOUT , he cannot able to go on
previously visited page.!
and my doubts are :
1> If i use this code ,then is it affect my session variables or session ID.
2> I have used the code as like :-
Session.Clear();
Session.Abandon();
Response.Redirect("Login.aspx");
but I can go back to previously visited page and my sessionID also does not change.
and the main thing to note that the user can use the session variables on that page.
and ofcourse send the legal request to server..and unfortunately server respond it as current user request.
3> I cannot use the no-cache or noStore method to disable Back functionality.
due to database application and some image on my page..
If I use the No-cacheing method then for each visit to page the images/large data
should be taken from server and it may be slowdown the performance of site.
Plz Help me..
i m waitng for ur valuable reply..
I have never failed,I just found 1000 ways that never works.
Regards,
Victory.
|
|
|
|
 |
|
 |
First of all thnx a lot for your such a good post. But friend it is not working at it's best in Mozilla but running perfectly in Internet Explorer...
Can you tell me what is this problem
|
|
|
|
 |
|
 |
it works good i work with this for 1 year ago but with the master page some times redirect and logout without press the logout button ..... so what the problem is ?
|
|
|
|
 |
|
 |
i think your code doesnt work with mozilla browser. Thanks in advance dddd
|
|
|
|
 |
|
 |
I tried this but on clicking the back button it's going to the previous page.
How to stop that??????????????????????????????????.Pls mail me if you have solution.............
|
|
|
|
 |
|
 |
What about Opera browser?
This two lines works for IE and FireFox but not for Opera:
System.Web.HttpContext.Current.Response.Expires =-1500;
System.Web.HttpContext.Current.Response.Cache.SetNoStore();
TomazZ
|
|
|
|
 |
|
 |
I hate to point this out but some excerpts in this article are word by word plagiarized from a similar one by Phil Paxton and John Sheppard.
Kindly try to use your own ideas and phrases while writing up any article.
Thanks,
New2.Net
|
|
|
|
 |
|
 |
Can you post a link to the original article?
|
|
|
|
 |
|
 |
I think he's quite right, but the article is not exactly the same word by word.
This is the link of the original Phil Paxton article:
http://www.learnasp.com/freebook/asp/cachenomore.aspx
Sad but true, the guy is right.
|
|
|
|
 |
|
 |
Hi all,
I am just new to this DotNet field. I am created a login control for my web pages. But i am stuck with this problem.
After reading this article, i ve made it. It works good with IE.
Thanks Code project team...and all.
Regars,
Jay
|
|
|
|
 |
|
 |
hai
The values in the cache is not going, exspecially in firefox. waste program.
Put some updated code for working in firefox and ie. or i should recommend to remove this article codes from this page
|
|
|
|
 |
|
 |
I think you should appreciate the efforts made by the indivisuals You can just Ask If its not supporting the FireFox,
Any ways here is the code for both FireFox and Internet Explorer I have tested this on both and it worked for me
//############# Removes page from Cache Even if Browsers Back Button is pressed
Response.Buffer=true;
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl ="no-cache";
Response.Cache.SetNoStore();
//#####################################################################
|
|
|
|
 |
|
 |
I believe the correct method to use in .NET is
Response.Cache.SetNoStore();
Seems to work for me. If you logout then go back to the previously displayed page, there is a server round trip.
Additionally, when logging out you should use
Session.Abandon();
Session.Redirect("Login.aspx");
instead of Session["loggedIn"] = false;
Session.Abandon() makes sure all session variables are cleared and a new session commences (on the next page, hence the redirect.
|
|
|
|
 |
|
 |
I works on FF, but unfortunately not on Opera. Still, thanks a lot.
|
|
|
|
 |
|
 |
Thanks a lot ,this code( Response.Cache.SetNoStore();) works with every browser.
really helped me.
|
|
|
|
 |
|
 |
If you use the back button first the client cache will be showed (as i know not for script/dynamic generated pages).
If the page will be showed while using ASP the server has some problems with the security handling of the user. Every Page you show should have a handler in the PageLoad where you check the Login State of the User and if required redirect him to a new Login Page/Error Page. This works fine.
|
|
|
|
 |
|
 |
Usually I use that method:
you can set a Session["..."] variable to use for checking the user's login status.
Login ---> Session["LoginDone"] = true;
Logout ---> Session["LoginDone"] = false;
Page_Load(...) {
if(Session["LoginDone"] == null || Session["LoginDone"] == false) {
Response.Redirect("Login.aspx");
}
}
if the browser shows the page in its cache no problem: it contains 'legal' data.
if it tries to load the page from the server, a new login is needed.
|
|
|
|
 |