Solved

IE9 back button

Posted on 2013-05-25
10
388 Views
Last Modified: 2013-05-27
When using the back button in IE9 the previous page does not actually get called (i.e. when debugging in VS2010 cannot break in the page) but it does when using FireFox and Chrome. Any ideas how to force it to do so ?
0
Comment
Question by:cehrnow
10 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39197504
0
 

Author Comment

by:cehrnow
ID: 39197516
Thanks Rainer but using:

Press F12 and go to the tab Cache and check Always refresh from server

..did not make any difference.
0
 
LVL 16

Expert Comment

by:Stephan
ID: 39199056
You best need to set this at the response object:
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 39199486
Hi,

You can also do a quick - CTRL + F5.

Adding Cache information to Response Header is more reliable solution!

Hope it helps u...
0
 

Author Comment

by:cehrnow
ID: 39199533
Did try...

Response.Cache.SetCacheability(HttpCacheability.NoCache)

...which doesn't appear to make any difference.
0
 
LVL 16

Expert Comment

by:Stephan
ID: 39199538
Thats weird because I have this running correctly and is used in production. Do you have some compression enabled in the web.config?
0
 
LVL 16

Expert Comment

by:Stephan
ID: 39199539
Or caching
0
 

Author Comment

by:cehrnow
ID: 39199545
Not that I can see and certainly nothing intentionally. Particularly frustrating as okay with FF and Chrome but not IE9 or IE10. Is your production site based on .NET 4 ?
0
 
LVL 16

Accepted Solution

by:
Stephan earned 500 total points
ID: 39199564
Just created a new app and tested in IE10 and works on my end.

There is the code I used:
public ActionResult Index()
        {
            Response.Expires = 0;
            Response.Cache.SetNoStore();
            Response.AppendHeader("Pragma", "no-cache");
            return View(DateTime.Now);
        }

        public ActionResult Index2()
        {
            return View("Index", DateTime.Now);
        }

Open in new window



*edit*
I tested this on .NET 2.0, 4.0 and 4.5
0
 

Author Closing Comment

by:cehrnow
ID: 39199868
Thanks stephanonline - that works !
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question