设置“最后修改时间”标头为“修改日期” ASP.NET MVC 中的文件?

发布于 2024-08-23 04:48:17 字数 183 浏览 13 评论 0原文

我试图找出如何优化“修改日期”以在 ASP.NET MVC 的上次修改标头中使用。

我不想检查每个请求的日期,因为这似乎会降低性能。

基本上,目前我使用“发布日期”来进行日期修改,但这里的问题是每次我进行发布时 - 所有最后修改的标头都会更新到该日期。

如何将最后修改的标头设置为文件的“最后修改日期”?

I am trying to figure out how to optimize getting the "Date modified" to use in the last-modified header in ASP.NET MVC.

I don't want to check the date of each request as this seems loss of performance.

Basically, at the moment I am using "Release Date" for date-modified, but the problem here is that every time I do a release - all the last-modified headers update to this date.

How to set the last-modified header to the "last Date-modified" of the file ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文