繁体   English   中英

html脚本不会根据AMP Validator从index.html中删除,但会从我这一边的index.html中删除

[英]html script won't remove from index.html according to AMP Validator but its removed from my index.html on my side

我有一个不会从我的html中删除的html脚本。 我从siteapps.com添加了此脚本,并意识到它没有通过放大器,所以我将其删除。 现在,每次我去amp验证我的页面时,它仍然会在那说,并且不会通过。 但是我已经从index.html中删除了代码。 这是脚本:

'<script data-cfasync="false">$SA={s:271308,tag_info:"1.0.1-autotag",asynch:1,useBlacklistUrl:1};
(function(){var sa=document.createElement("script");sa.type="text/javascript";sa.async=true;
sa.src=("https:"==document.location.protocol?"https://"+$SA.s+".sa":"http://"+$SA.s+".a")+".siteapps.com/"+$SA.s+".js";
var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(sa,t);})();</script></head>`

这是我的HTML:

 <!doctype html> <html amp lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui"> <title>Rayne Mirrors - Mirrors</title> <link rel=canonical href="https://raynemirrors.com/index.html"> <meta http-equiv=Content-Type content="text/html; charset=utf-8"/> <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"> <meta name=description content="Take your home decor to the next level"> <meta name=keywords content="mirrors"> <meta property=og:site_name content="Rayne Mirrors Inc."/> <meta property=og:title content="Rayne Mirrors Inc. - Mirrors"/> <meta property=og:description content="Take your home decor to the next level"/> <meta property=og:image content="https://raynemirrors.com/raynemirrorsinc.jpg"/> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style> <noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script> <style amp-custom>*{box-sizing:border-box;} .header{background-color:#ffffff;padding:0px;} amp-img{width:100%;height:auto;max-width:100%;} .menu ul{list-style-type:none;margin:0;padding:0;} .menu li{padding:8px;margin-bottom:7px;background-color:#ffffff;box-shadow:0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);} .menu li:hover{background-color:#D1CFCF;} .aside{background-color:#ffffff;padding:0px;color:#000000;text-align:center;font-size:14px;box-shadow:0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);} [class*="col-"]{float:left;padding:15px;width:100%;} .row:after{content:"";clear:both;display:table;} .halfwidth{max-width:800px;} .halfwidth2{max-width:100px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth3{max-width:300px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth4{max-width:800px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth5{max-width:90px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth8{max-width:90px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth9{max-width:300px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth10{max-width:700px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth11{max-width:150px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .halfwidth12{max-width:400px;text-align:center;padding:0px;margin:0 auto;padding-left:0px;} .rounded-corners{border-radius:20px;} .amp-wp-title{font-weight:bold;font-size:14px;color:#FF0004;} .amp-wp-title1{font-weight:bold;font-size:20px;color:#ff0000;} .amp-wp-title2{font-weight:bold;font-size:20px;color:#0000ff;} .wrapper{border:2px solid #C1C1C1;border-radius:0px;padding-left:0px;padding-right:0px;} @media only screen and (min-width:600px){.col-s-1{width:8.33%;} .col-s-2{width:16.66%;} .col-s-3{width:20%;} .col-s-4{width:33.33%;} .col-s-5{width:41.66%;} .col-s-6{width:60%;} .col-s-7{width:58.33%;} .col-s-8{width:66.66%;} .col-s-9{width:75%;} .col-s-10{width:83.33%;} .col-s-11{width:91.66%;} .col-s-12{width:100%;} } @media only screen and (min-width:768px){.col-1{width:8.33%;} .col-2{width:16.66%;} .col-3{width:20%;} .col-4{width:33.33%;} .col-5{width:41.66%;} .col-6{width:60%;} .col-7{width:58.33%;} .col-8{width:66.66%;} .col-9{width:75%;} .col-10{width:83.33%;} .col-11{width:91.66%;} .col-12{width:100%;} } html{font-family:"Lucida Sans", sans-serif;} .footer{background-color:#ffffff;text-align:center;font-size:16px;padding:0px;}</style> <link rel=icon href="/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/> <script async src="https://cdn.ampproject.org/v0.js"></script> <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script> </head> 

这是我的耳放验证器的屏幕截图...

AMP Validator屏幕截图: 在此处输入图片说明

您可以在屏幕截图中获取我的链接...(不确定是否可以将链接发布到我的网站)

甚至页面速度网站也出现相同的错误...我该怎么做才能解决此问题?

您缺少脚本上的类型声明。

type =“ application / ld + json”

<script type="application/ld+json" data-cfasync="false">$SA={s:271308,tag_info:"1.0.1-autotag",asynch:1,useBlacklistUrl:1};(function(){var sa=document.createElement("script");sa.type="text/javascript";sa.async=true;sa.src=("https:"==document.location.protocol?"https://"+$SA.s+".sa":"http://"+$SA.s+".a")+".siteapps.com/"+$SA.s+".js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(sa,t);})();</script></head>

https://www.ampproject.org/docs/tutorials/create/basic_markup

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM