javascript - CDATA showing up in my HTML page. Why? -
i have html page when load on phone there long text begins "cdata". didn't add page. minified , concatenated javascript gulp 1 file. have velocity.js , jquery libraries loaded. when reload page couple of times long text gone. how can rid of issue? have coded on own , didn't use libraries expect ones mentioned above.
i grateful help! thanks!
i think problem page speed script, inside script can see these lines:
<script pagespeed_no_defer="">//<![cdata[ (function(){var g=this,h=function(b,d){var a=b.split("."),c=g;a[0]in c||!c.execscript||c.execscript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===d?c[e]?c=c[e]:c=c[e]={}:c[e]=d};var l=function(b){var d=b.length;if(0<d){for(var a=array(d),c=0;c<d;c++)a[c]=b[c];return a}return[]};var m=function(b){var d=window;if(d.addeventlistener)d.addeventlistener("load",b,!1);else if(d.attachevent)d.attachevent("onload",b);else{var a=d.onload;d.onload=function(){b.call(this);a&&a.call(this)}}};var n,p=function(b,d,a,c,e){this.f=b;this.h=d;this.i=a;this.c=e;this.e={height:window.innerheight||document.documentelement.clientheight||document.body.clientheight,width:window.innerwidth||document.documentelement.clientwidth||document.body.clientwidth};this.g=c;this.b={};this.a=[];this.d={}},q=function(b,d){var a,c,e=d.getattribute("pagespeed_url_hash");if(a=e&&!(e in b.d))if(0>=d.offsetwidth&&0>=d.offsetheight)a=!1;else{c=d.getboundingclientrect();var f=document.body;a=c.top+("pageyoffset"in window?window.pageyoffset:(document.documentelement||f.parentnode||f).scrolltop);c=c.left+("pagexoffset"in window?window.pagexoffset:(document.documentelement||f.parentnode||f).scrollleft);f=a.tostring()+","+c;b.b.hasownproperty(f)?a=!1:(b.b[f]=!0,a=a<=b.e.height&&c<=b.e.width)}a&&(b.a.push(e),b.d[e]=!0)};p.prototype.checkimageforcriticality=function(b){b.getboundingclientrect&&q(this,b)};h("pagespeed.criticalimages.checkimageforcriticality",function(b){n.checkimageforcriticality(b)});h("pagespeed.criticalimages.checkcriticalimages",function(){r(n)});var r=function(b){b.b={};for(var d=["img","input"],a=[],c=0;c<d.length;++c)a=a.concat(l(document.getelementsbytagname(d[c])));if(0!=a.length&&a[0].getboundingclientrect){for(c=0;d=a[c];++c)q(b,d);a="oh="+b.i;b.c&&(a+="&n="+b.c);if(d=0!=b.a.length)for(a+="&ci="+encodeuricomponent(b.a[0]),c=1;c<b.a.length;++c){var e=","+encodeuricomponent(b.a[c]);131072>=a.length+e.length&&(a+=e)}b.g&&(e="&rd="+encodeuricomponent(json.stringify(s())),131072>=a.length+e.length&&(a+=e),d=!0);t=a;if(d){c=b.f;b=b.h;var f;if(window.xmlhttprequest)f=new xmlhttprequest;else if(window.activexobject)try{f=new activexobject("msxml2.xmlhttp")}catch(k){try{f=new activexobject("microsoft.xmlhttp")}catch(u){}}f&&(f.open("post",c+(-1==c.indexof("?")?"?":"&")+"url="+encodeuricomponent(b)),f.setrequestheader("content-type","application/x-www-form-urlencoded"),f.send(a))}}},s=function(){var b={},d=document.getelementsbytagname("img");if(0==d.length)return{};var a=d[0];if(!("naturalwidth"in a&&"naturalheight"in a))return{};for(var c=0;a=d[c];++c){var e=a.getattribute("pagespeed_url_hash");e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalwidth&&0<a.naturalheight||e in b&&a.width>=b[e].k&&a.height>=b[e].j)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalwidth,oh:a.naturalheight})}return b},t="";h("pagespeed.criticalimages.getbeacondata",function(){return t});h("pagespeed.criticalimages.run",function(b,d,a,c,e,f){var k=new p(b,d,a,e,f);n=k;c&&m(function(){window.settimeout(function(){r(k)},0)})});})();pagespeed.criticalimages.run('/mod_pagespeed_beacon','http://beta.tim-specht.com/sites/praxis3/','l-uclzp3o3',true,false,'vydwyul8cpc'); //]]></script>
try removing these lines
Comments
Post a Comment