Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

IE9 back button

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
cehrnow
Asked:
cehrnow
1 Solution
 
Rainer JeschorCommented:
0
 
cehrnowAuthor Commented:
Thanks Rainer but using:

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

..did not make any difference.
0
 
StephanLead Software EngineerCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Roopesh ReddyIT AnalystCommented:
Hi,

You can also do a quick - CTRL + F5.

Adding Cache information to Response Header is more reliable solution!

Hope it helps u...
0
 
cehrnowAuthor Commented:
Did try...

Response.Cache.SetCacheability(HttpCacheability.NoCache)

...which doesn't appear to make any difference.
0
 
StephanLead Software EngineerCommented:
Thats weird because I have this running correctly and is used in production. Do you have some compression enabled in the web.config?
0
 
StephanLead Software EngineerCommented:
Or caching
0
 
cehrnowAuthor Commented:
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
 
StephanLead Software EngineerCommented:
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
 
cehrnowAuthor Commented:
Thanks stephanonline - that works !
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now