nginx.conf,如下:

location / {
add_header X-UA-Compatible 'IE=Edge,chrome=1'; # 这里是自定义头
root www/htdocs;
index index.php index.html index.htm;
}

其中,X-UA-Compatible是名称,IE=Edge,chrome=1是值,可以随意自定义。在html的<head></head>标签中可以添加http请求:

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

添加完之后重启nginx和浏览器,然后打开添加了自定义head的页面查看效果。

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2021-10-23
  • 2021-08-22
  • 2021-07-07
  • 2022-02-19
  • 2021-09-26
  • 2021-11-08
猜你喜欢
  • 2022-01-19
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案