pagespeed_no_defer bug - IP Board

60 views
Skip to first unread message

Mark Beeson

unread,
Apr 14, 2014, 8:08:03 PM4/14/14
to mod-pagesp...@googlegroups.com
Hi,

Everytime I or a member goes to quote a post it shows this

<script pagespeed_no_defer="">//=a.offsetWidth&&0>=a.offsetHeight)return!1;a=this.j(a);var c=a.top.toString()+y+a.left.toString();if(this.b.hasOwnProperty(c))return!1;this.b[c]=!0;return a.top<=this.c[p]&&a.left<=this.c[m]};O[r].l=function(){for(var a=[F,G],c=[],d={},b=0;b{d=y+e(c[b]);if(131072=a[q]+d[q]&&(a+=d),b=!0);N.criticalImagesBeaconData=a;if({var c=this.d,b=this.f,l;if(f.XMLHttpRequest)l=new XMLHttpRequest;else if(f.ActiveXObject)try{l=new ActiveXObject(C)}catch(P){try{l=new ActiveXObject(}catch(Q){}}l&&(l.open(D,c+(-1==c.indexOf(z)?z:t)+L+e(),l.setRequestHeader(A,E),l.send(a))}};O[r].h=function(){for(var a={},c=h.getElementsByTagName(F),d=0;d=a[b.src].n&&b[p]>=a[b.src].m)a[g]={renderedWidth:b[m],renderedHeight:b[p],originalWidth:b.naturalWidth,originalHeight:b.naturalHeight}}return a};N.k=function(a,c,d,b,g){var k=new O(a,c,d,b,g);M(f,H,function(){f.setTimeout(function(){k.l()},0)})};N.criticalImagesBeaconInit=N.k;})();pagespeed.criticalImagesBeaconInit('/mod_pagespeed_beacon','http://customsforge.com/index.php?s=d0a6cff816f837a5ad54d9de8a3154fd&app=forums&module=ajax§ion=topics&do=quote&t=4669&p=30458&md5check=427ccf19806b34056d832b768b99c2e7&isRte=1','vZeVqb8pNP',false,'QU-ryF149i0'); //]]></script>

Is there anyway to disable this?

Jan-Willem Maessen

unread,
Apr 15, 2014, 8:17:18 AM4/15/14
to mod-pagesp...@googlegroups.com
Hi Mark –

Is this literal text appearing on the page, or just a bad <script> block in the page source?

Do you have a url you can share?  (Feel free to respond privately if that's helpful.)  This doesn't look quite right but I'd like to understand the context of what's going on here.

-Jan


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/6416f9ab-00f8-45eb-884a-0e1ce05637b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

RudolfV

unread,
Feb 23, 2015, 10:55:01 AM2/23/15
to mod-pagesp...@googlegroups.com
Hi

We are also encountering this intermittently. It looks like the script is indiscriminately injected into the HTML, see the below snippet. I will send the full HTML source in a private message.

We are running version 1.7.30.4-3847 of mod_pagespeed

<div class="main-grid-full" placeh<script pagespeed_no_defer="">//<![CDATA[
(function(){var e=encodeURIComponent,f=window,h=document,m="width",n="documentElement",p="height",q="length",r="prototype",s="body",t="&",u="&ci=",w="&n=",x="&rd=",y=",",z="?",A="Content-Type",B="Microsoft.XMLHTTP",C="Msxml2.XMLHTTP",D="POST",E="application/x-www-form-urlencoded",F="img",G="input",H="load",I="oh=",J="on",K="pagespeed_url_hash",L="url=",M=function(a,c,d){if(a.addEventListener)a.addEventListener(c,d,!1);else if(a.attachEvent)a.attachEvent(J+c,d);else{var b=a[J+c];a[J+c]=function(){d.call(this);b&&b.call(this)}}};f.pagespeed=f.pagespeed||{};var N=f.pagespeed,O=function(a,c,d,b,g){this.d=a;this.f=c;this.g=d;this.a=g;this.c={height:f.innerHeight||h[n].clientHeight||h[s].clientHeight,width:f.innerWidth||h[n].clientWidth||h[s].clientWidth};this.e=b;this.b={}};O[r].j=function(a){a=a.getBoundingClientRect();return{top:a.top+(void 0!==f.pageYOffset?f.pageYOffset:(h[n]||h[s].parentNode||h[s]).scrollTop),left:a.left+(void 0!==f.pageXOffset?f.pageXOffset:(h[n]||h[s].parentNode||h[s]).scrollLeft)}};O[r].i=function(a){if(0>=a.offsetWidth&&0>=a.offsetHeight)return!1;a=this.j(a);var c=a.top.toString()+y+a.left.toString();if(this.b.hasOwnProperty(c))return!1;this.b[c]=!0;return a.top<=this.c[p]&&a.left<=this.c[m]};O[r].l=function(){for(var a=[F,G],c=[],d={},b=0;b<a[q];++b)for(var g=h.getElementsByTagName(a[b]),k=0;k<g[q];++k){var v=g[k].getAttribute(K);v&&g[k].getBoundingClientRect&&this.i(g[k])&&!(v in d)&&(c.push(v),d[v]=!0)}b=!1;a=I+this.g;this.a&&(a+=w+this.a);if(0!=c[q]){a+=u+e(c[0]);for(b=1;b<c[q];++b){d=y+e(c[b]);if(131072<a[q]+d[q])break;a+=d}b=!0}this.e&&(d=x+e(JSON.stringify(this.h())),131072>=a[q]+d[q]&&(a+=d),b=!0);N.criticalImagesBeaconData=a;if(b){var c=this.d,b=this.f,l;if(f.XMLHttpRequest)l=new XMLHttpRequest;else if(f.ActiveXObject)try{l=new ActiveXObject(C)}catch(P){try{l=new ActiveXObject(B)}catch(Q){}}l&&(l.open(D,c+(-1==c.indexOf(z)?z:t)+L+e(b)),l.setRequestHeader(A,E),l.send(a))}};O[r].h=function(){for(var a={},c=h.getElementsByTagName(F),d=0;d<c[q];++d){var b=c[d],g=b.getAttribute(K);if("undefined"==typeof b.naturalWidth||"undefined"==typeof b.naturalHeight||"undefined"==typeof g)break;if("undefined"==typeof a[b.src]&&0<b[m]&&0<b[p]&&0<b.naturalWidth&&0<b.naturalHeight||"undefined"!=typeof a[b.src]&&b[m]>=a[b.src].n&&b[p]>=a[b.src].m)a[g]={renderedWidth:b[m],renderedHeight:b[p],originalWidth:b.naturalWidth,originalHeight:b.naturalHeight}}return a};N.k=function(a,c,d,b,g){var k=new O(a,c,d,b,g);M(f,H,function(){f.setTimeout(function(){k.l()},0)})};N.criticalImagesBeaconInit=N.k;})();


On Tuesday, April 15, 2014 at 2:17:18 PM UTC+2, Jan-Willem Maessen wrote:
Hi Mark –

Is this literal text appearing on the page, or just a bad <script> block in the page source?

Do you have a url you can share?  (Feel free to respond privately if that's helpful.)  This doesn't look quite right but I'd like to understand the context of what's going on here.

-Jan
On Mon, Apr 14, 2014 at 8:08 PM, Mark Beeson <unlea...@gmail.com> wrote:
Hi,

Everytime I or a member goes to quote a post it shows this

<script pagespeed_no_defer="">//=a.offsetWidth&&0>=a.offsetHeight)return!1;a=this.j(a);var c=a.top.toString()+y+a.left.toString();if(this.b.hasOwnProperty(c))return!1;this.b[c]=!0;return a.top<=this.c[p]&&a.left<=this.c[m]};O[r].l=function(){for(var a=[F,G],c=[],d={},b=0;b{d=y+e(c[b]);if(131072=a[q]+d[q]&&(a+=d),b=!0);N.criticalImagesBeaconData=a;if({var c=this.d,b=this.f,l;if(f.XMLHttpRequest)l=new XMLHttpRequest;else if(f.ActiveXObject)try{l=new ActiveXObject(C)}catch(P){try{l=new ActiveXObject(}catch(Q){}}l&&(l.open(D,c+(-1==c.indexOf(z)?z:t)+L+e(),l.setRequestHeader(A,E),l.send(a))}};O[r].h=function(){for(var a={},c=h.getElementsByTagName(F),d=0;d=a[b.src].n&&b[p]>=a[b.src].m)a[g]={renderedWidth:b[m],renderedHeight:b[p],originalWidth:b.naturalWidth,originalHeight:b.naturalHeight}}return a};N.k=function(a,c,d,b,g){var k=new O(a,c,d,b,g);M(f,H,function(){f.setTimeout(function(){k.l()},0)})};N.criticalImagesBeaconInit=N.k;})();pagespeed.criticalImagesBeaconInit('/mod_pagespeed_beacon','http://customsforge.com/index.php?s=d0a6cff816f837a5ad54d9de8a3154fd&app=forums&module=ajax§ion=topics&do=quote&t=4669&p=30458&md5check=427ccf19806b34056d832b768b99c2e7&isRte=1','vZeVqb8pNP',false,'QU-ryF149i0'); //]]></script>

Is there anyway to disable this?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages