Pra*_*mod 6 html jsp http response-headers
我需要将 X-Frame、Cache-control、Pragma 等响应头直接添加到 html 代码中,可能是使用 html 元素中的属性?
它用于通过 href 链接直接来自目录的帮助页面。
有没有办法向这些 html 添加标题?
hop*_*att 11
您可以用来meta复制其中的一些。通常这不是理想的解决方案,但请查看标签http-equiv的属性meta。我相信其中很多在较新的浏览器中已被弃用。
例子:
<meta http-equiv="Cache-control" content="no-cache"/>
<meta http-equiv="X-Frame-Options" content="sameorigin"/>
<meta http-equiv="pragma" content="no-cache"/>
Run Code Online (Sandbox Code Playgroud)