百度MIP校验错误整理与解决方法

MIP校验工具地址: 

https://www.mipengine.org/validator/validate

1.强制性标签缺失或错误

错误提示:line 1,col 1: 强制性标签'<script type="/^(text/javascript)?/" src="/^(http(s)?:)?//(mipcache.bdstatic.com/static/mipmain)|(m.baidu.com/static/ala/sf/static/)|((http(s)?:)?//mipcache.bdstatic.com/static/v\d/)/">'缺失或错误

解决方法:

在<head>中添加

<link rel="stylesheet" type="text/css" href="https://mipcache.bdstatic.com/static/v1/mip.css">

 <link rel="canonical" href="https://www.baidu.com">

  在<body>中添加

 <script src="https://mipcache.bdstatic.com/static/v1/mip.js"></script>      

<script src="https://mipcache.bdstatic.com/static/v1.0/mip-ad.js"></script>

扫描二维码关注公众号,回复: 4963606 查看本文章

2.meta标签viewport

错误提示:line 6,col 5: 标签'meta'中的属性'content'的属性'initial-scale'被设置为'1.0',该属性值无效

解决方法:将initial-scale改为1

3.禁止使用某标签、某属性值无效

错误提示:line 22,col 48: 禁止使用'<img src="/img/title_logo.gif" alt="kcc游戏">'标签

解决方法:将img标签改为mip-img标签

错误提示:line 29,col 56: 标签'mip-img'中的属性'src'的属性值'/img/yon.gif'无效

解决方法'/img/yon.gif'改为http://yoursite/img/yon.gif

错误提示: line 28,col 28: 标签'a'中的属性'href'的属性值'/games/balls/'无效

解决方法:将属性值'/games/balls/'改为http://yoursite/games/balls/

更多错误可联系博主无偿解决

猜你喜欢

转载自www.cnblogs.com/svip7/p/mipxiaoyancuowu.html
今日推荐