Posted in

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

随着网站内容日渐丰富,网站内容开始逐渐被搜索引擎搜录。但是发现从被收录处打开网站该页面默认是被浏览器的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" />

嗨,叫我老刘就好。我已从事知识产权行业13年,这个博客主要围绕商标版权做经验分享。希望能帮到大家。有商标、版权业务方面的需求可以直接扫码添加我的微信咨询。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注