百度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>

 

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/

更多錯誤可聯繫博主無償解決

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章