asp.net - 如何在 IIS 10 和 ASP Clasic 上添加 Etag 和 Last Modified Header?
问题描述
如何使用 ASP Clasic 页面在 IIS 10 上添加 Last modified Headers 和 Last Modified 标头?
如果我检查例如 test.html IIS 10 的标头给我这个响应
Accept-Ranges: none
Content-Length: 16
Content-Type: text/html
Date: Wed, 11 Nov 2020 12:57:15 GMT
ETag: "5895395521b8d61:0"
Last-Modified: Wed, 11 Nov 2020 11:53:55 GMT
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Frame-Option: deny
X-Powered-By: ASP.NET
但是,如果我们检查 test.asp IIS 的标头,请给我这个响应标头
Cache-Control: private
Content-Length: 149
Content-Type: text/html
Date: Wed, 11 Nov 2020 12:53:54 GMT
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Frame-Option: deny
X-Powered-By: ASP.NET
我检查了 IIS 上的 HTTP 响应标头部分没有定义任何标头,并且使用 Enable Kernel Cache 选项启用了输出缓存。
解决方案
推荐阅读
- c# - 当条件不满足时循环中断
- r - 根据另一列中的值创建列
- amazon-web-services - 仅在 vpc 内使用 k8s Ingress
- kubernetes - 如何在 Kubernetes StatefullSet 中定义本地暂存卷?
- swift - CallerID 分机的最大限制
- java - 如何使用 Android Studio 实现 LAN Scanner?
- google-cloud-functions - 移动现有的 mqtt-iot 设备以使用 Google 云
- postgresql - postgres 用 string_agg 分组
- r - 为数据帧列表中的每个数据帧按列计算列中值绝对偏差 (MAD)
- r - 随机排序组内的行