Akina For Typecho主题修改:解决网站被收录页面默认用IE模式打开的问题

本文共有968个字。 # Akina For Typecho/ a

随着网站内容日渐丰富,网站内容开始逐渐被搜索引擎搜录。但是发现从被收录处打开网站该页面默认是被浏览器的IE模式打开的,故询问了下主题的开发者,得到以下解决方案。

添加部分代码至header.php文件。

添加前:

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="x-dns-prefetch-control" content="on" />

添加后:

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="x-dns-prefetch-control" content="on" />

「仍有疑问未解决欢迎加博主微信交流」

版权声明:本文如需转载须联系作者本人同意,未经作者本人同意不得擅自转载。

添加新评论

暂无评论