zsharp
zsharp

Reputation: 13756

Can I cache just the last page visited?

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?

Upvotes: 0

Views: 244

Answers (1)

RickNZ
RickNZ

Reputation: 18654

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.

Upvotes: 1

Related Questions