views:

48

answers:

1

Is there a way to cache only the last page the client visits in MVC, like a browser does, or do i need to use javascript and use the browser functionality?

+1  A: 

You can cache the previous page on the server (output caching), but there's no way to refer to it from the next page.

Would something like cross-page posts work for you? They reconstruct the state of the controls on the previous page, and make them accessible to the current page.

Information from a previous page is normally considered "state" information -- as such, one alternative is to use cookies or Session state to store the information you need to carry over.

RickNZ