[英]Can I cache just the last page visited?
有没有一种方法可以像浏览器一样仅缓存客户端在MVC中访问的最后一页,还是我需要使用JavaScript并使用浏览器功能?
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. 前一页中的信息通常被视为“状态”信息-因此,一种替代方法是使用Cookie或会话状态来存储您需要保留的信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.