Share via


How to force a view page to reload/refresh, when user hit the "Back" button and get back to this page?

Question

Tuesday, October 21, 2014 1:30 AM

Hi,

I'm working on a MVC3 web app with c#, Razor, EF. For 1 page, I need to do this: if the user hit "Next" button on this page A, go to Page B, then hit "next" on page B to go to Page C, then hit "back" button twice to get back to page A - page  A now needs to display different things based on what user did on page A and B.

So - my understanding is: when the user hits "Back" button on the browser, they go back to the history, which has the "Original" view of Page A. How do I refresh Page A, in this case?

Any advice is appreciated.

Thanks,

Claudia

All replies (2)

Tuesday, October 21, 2014 1:48 AM âś…Answered

check these link

It all about the making the page expire from cache, so that it loads again

http://forums.asp.net/post/4198274.aspx

http://stackoverflow.com/questions/21906971/how-to-refresh-asp-net-mvc-page-when-hitting-browser-back-button


Wednesday, October 22, 2014 2:26 PM

Thanks a lot cnuonline - the code from the 2nd link worked like a charm!

Thanks,

Claudia