views:

73

answers:

1

Hi everyone.

I'm having a problem with ASP.NET MVC 1.0.

The first time I access a View "Products", its ActionResult method is called without a problem (I used a breakpoint to see it).

But, if I access a View "ProductsOrders", for example, and try to go back to "Products" by pressing browser go back button, the "Products" ActionResult is NOT accessed, just its javascript file.

Why can I only access the "Products" the javascript file when I go back but the ActionResult don't?? Shouldn't the Action be called again as well?

Thanks!

Regards

+2  A: 

No, not necessarily. When you hit the browser's back button, the page usually comes from the browser's cache. If you want to prevent that, you shouldn't allow the browser to cache the page. It's even possible that it comes from the ASP.NET output cache (or a web proxy in between), in that case your action wouldn't be called either...

Just saw a related question that could help you with that: http://stackoverflow.com/questions/1160105/asp-net-mvc-disable-browser-cache

chris166