ISSUE: On page reload of a WordPress 4.1 custom theme, I get the error “GET … /%3Cscript%20pagespeed_no_defer= 404 (Not Found)” in my console, and on the web page it shows script. If I refresh a few more times, it goes away, then another refresh and it returns.
GOAL / QUESTION: Guidance on how to further troubleshoot this error? Is this as simple as disabling only this feature? Most importantly, I would like to understand WHY this issue occurred. Thank you for your time!
WORKAROUND: If I disable pagespeed in the httpd.conf, the issue goes away.
ENVIRONMENT: Client: OS X 10.10.2, Chrome 40.0.2214.94 (64-bit), Safari 8.0.3, FF 35.0.1; Server: Bitnami VM, Ubuntu 14.04, WordPress 4.1
BACKGROUND: I am creating a basic WordPress theme. I started off with the template from underscores.me/ and added in some generic .js (bootstrap, etc…) When I loaded the page for the first time, it looked fine. When I hit refresh, it threw js code into the body. I am new to using PageSpeed, so any guidance would be appreciated. I have other themes and plug-ins I have developed, but this is a new issue for me.
REFERENCE LINKS:
https://forums.plex.tv/index.php/topic/98618-script-appears-in-reply-as-text-when-doing-quote-reply-on-forum/ Best match to what I am seeing, and the work around I used…
https://developers.google.com/speed/pagespeed/service/DeferJavaScript
If the answer is here, I am not seeing it…
I also had more links, but these were the most relevant.
Here is an example when the page loads correctly…
<html lang="en-US"> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="http://192.168.70.130/xmlrpc.php">
<title>NV | NVWPDEVSPM03 </title>
<link rel="alternate" type="application/rss+xml" title="NV » Feed" href="http://192.168.70.130/feed/">
<link rel="alternate" type="application/rss+xml" title="NV » Comments Feed" href="http://192.168.70.130/comments/feed/">
<link rel="alternate" type="application/rss+xml" title="NV » Home Comments Feed" href="http://192.168.70.130/home/feed/">
<link rel="stylesheet" id="open-sans-css" href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.1" type="text/css" media="all">
<link rel="stylesheet" id="dashicons-css" href="http://192.168.70.130/wp-includes/css/dashicons.min.css,qver=4.1.pagespeed.ce.UZxcrXP6ne.css" type="text/css" media="all">
<link rel="stylesheet" id="admin-bar-css" href="http://192.168.70.130/wp-includes/css/admin-bar.min.css,qver=4.1.pagespeed.ce.ijxCXNyHcG.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/A.style.css,qver=4.1.pagespeed.cf.bZbMpNtUMT.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-bootstrap-min-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/A.bootstrap.min.css,qver=4.1.pagespeed.cf.XAf2gFe0Gs.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-font-awesome-min-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/A.font-awesome.min.css,qver=4.1.pagespeed.cf.HpcIsdYD5q.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-jquery-ui-min-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/A.jquery-ui.min.css,qver=4.1.pagespeed.cf.L5sry_GBdl.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-google-roboto-css" href="http://fonts.googleapis.com/css?family=Roboto%3A400%2C300%2C300italic%2C400italic%2C500%2C500italic%2C700%2C700italic&ver=4.1" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-user-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/A.nvapp2015-user.css,qver=4.1.pagespeed.cf.fmlN9vVCt3.css" type="text/css" media="all">
<script type="text/javascript" src="http://192.168.70.130/wp-includes/js/jquery/jquery.js,qver=1.11.1.pagespeed.jm.z9hb-Gxqf6.js"> </script>
<script src="http://192.168.70.130/wp-includes,_js,_jquery,_jquery-migrate.min.js,,qver==1.2.1,Mjm.mhpNjdU8Wl.js+wp-content,_themes,_nvapp2015_s,_js,_navigation.js,,qver==4.1,Mjm.6Nd4Vs-f7y.js+wp-content,_themes,_nvapp2015_s,_js,_skip-link-focus-fix.js,,qver==4.1,Mjm.lDnzVc-ohN.js.pagespeed.jc.qEXpdtuky-.js"> </script> <script>eval(mod_pagespeed_bu58_vox6u); </script>
<script>eval(mod_pagespeed_rnPp6y$Leu); </script>
<script>eval(mod_pagespeed_v_mTWgtVPl); </script>
<script type="text/javascript" src="http://192.168.70.130/wp-content/themes/nvapp2015_s/js/jquery-ui.min.js,qver=4.1.pagespeed.jm.e-HKoI4nbp.js"> </script>
<script type="text/javascript" src="http://192.168.70.130/wp-content/themes/nvapp2015_s/js/bootstrap.min.js,qver=4.1.pagespeed.jm.-kRHVQtEas.js"> </script>
<script src="http://192.168.70.130/wp-content/themes/nvapp2015_s/js/jquery.backstretch.min.js,,qver==4.1,Mjm.U1NgPaOuHw.js+nvapp2015-user.js,,qver==4.1,Mjm.AkFrXxuiYg.js.pagespeed.jc.P6xbyh4_sf.js"> </script> <script>eval(mod_pagespeed_nEk421u75r); </script>
<script>eval(mod_pagespeed_KWmGPAZujM); </script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://192.168.70.130/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://192.168.70.130/wp-includes/wlwmanifest.xml">
<meta name="generator" content="WordPress 4.1">
<link rel="canonical" href="http://192.168.70.130/">
<link rel="shortlink" href="http://192.168.70.130/">
<style type="text/css">.recentcomments a{display:inline!important;padding:0!important;margin:0!important} </style>
<style type="text/css" id="custom-background-css">body.custom-background{background-image:url(http://192.168.70.130/wp-content/uploads/2015/02/xhome-bg.png.pagespeed.ic.NgaIrW3Bbh.png);background-repeat:no-repeat;background-position:top left;background-attachment:scroll} </style>
<style type="text/css" media="print">#wpadminbar{display:none} </style>
<style type="text/css" media="screen">html{margin-top:32px!important}* html body{margin-top:32px!important}@media screen and (max-width:782px ){html{margin-top:46px!important}* html body{margin-top:46px!important}} </style>
</head>
<body class="home page page-id-7 page-template page-template-nvapp2015-page-home page-template-nvapp2015-page-home-php logged-in admin-bar no-customize-support custom-background"> <noscript><meta HTTP-EQUIV="refresh" content="0;url='http://192.168.70.130/?ModPagespeed=noscript'" /><style><!--table,div,span,font,p{display:none} --></style><div style="display:block">Please click <a href="http://192.168.70.130/?ModPagespeed=noscript">here</a> if you are not redirected within a few seconds.</div> </noscript>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content">Skip to content </a>
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<h1 class="site-title"> <a href="http://192.168.70.130/" rel="home">NV </a> </h1>
<h2 class="site-description">NVWPDEVSPM03 </h2>
</div> <!-- .site-branding -->
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle" aria-controls="menu" aria-expanded="false">Primary Menu </button>
<div class="menu"> <ul> <li class="page_item page-item-7 current_page_item"> <a href="http://192.168.70.130/">Home </a> </li> </ul> </div>
</nav> <!-- #site-navigation -->
</header> <!-- #masthead -->
<div id="content" class="site-content">
<div id="primary" class="content-area">
</div> <!-- #primary -->
</div> </div> </body> </html>
And here it is broken… (last 3 lines)
<html lang="en-US"> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="http://192.168.70.130/xmlrpc.php">
<title>NV | NVWPDEVSPM03 </title>
<link rel="alternate" type="application/rss+xml" title="NV » Feed" href="http://192.168.70.130/feed/">
<link rel="alternate" type="application/rss+xml" title="NV » Comments Feed" href="http://192.168.70.130/comments/feed/">
<link rel="alternate" type="application/rss+xml" title="NV » Home Comments Feed" href="http://192.168.70.130/home/feed/">
<link rel="stylesheet" id="open-sans-css" href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.1" type="text/css" media="all">
<link rel="stylesheet" id="dashicons-css" href="http://192.168.70.130/wp-includes/css/dashicons.min.css,qver=4.1.pagespeed.ce.UZxcrXP6ne.css" type="text/css" media="all">
<link rel="stylesheet" id="admin-bar-css" href="http://192.168.70.130/wp-includes/css/admin-bar.min.css,qver=4.1.pagespeed.ce.ijxCXNyHcG.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/A.style.css,qver=4.1.pagespeed.cf.bZbMpNtUMT.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-bootstrap-min-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/A.bootstrap.min.css,qver=4.1.pagespeed.cf.XAf2gFe0Gs.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-font-awesome-min-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/A.font-awesome.min.css,qver=4.1.pagespeed.cf.HpcIsdYD5q.css" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-jquery-ui-min-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/jquery-ui.min.css?ver=4.1" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-google-roboto-css" href="http://fonts.googleapis.com/css?family=Roboto%3A400%2C300%2C300italic%2C400italic%2C500%2C500italic%2C700%2C700italic&ver=4.1" type="text/css" media="all">
<link rel="stylesheet" id="nvapp2015-user-style-css" href="http://192.168.70.130/wp-content/themes/nvapp2015_s/css/nvapp2015-user.css?ver=4.1" type="text/css" media="all">
<script type="text/javascript" src="http://192.168.70.130/wp-includes/js/jquery/jquery.js,qver=1.11.1.pagespeed.jm.z9hb-Gxqf6.js"> </script>
<script src="http://192.168.70.130/wp-includes,_js,_jquery,_jquery-migrate.min.js,,qver==1.2.1,Mjm.mhpNjdU8Wl.js+wp-content,_themes,_nvapp2015_s,_js,_navigation.js,,qver==4.1,Mjm.6Nd4Vs-f7y.js+wp-content,_themes,_nvapp2015_s,_js,_skip-link-focus-fix.js,,qver==4.1,Mjm.lDnzVc-ohN.js.pagespeed.jc.qEXpdtuky-.js"> </script> <script>eval(mod_pagespeed_bu58_vox6u); </script>
<script>eval(mod_pagespeed_rnPp6y$Leu); </script>
<script>eval(mod_pagespeed_v_mTWgtVPl); </script>
<script type="text/javascript" src="http://192.168.70.130/wp-content/themes/nvapp2015_s/js/jquery-ui.min.js,qver=4.1.pagespeed.jm.e-HKoI4nbp.js"> </script>
<script type="text/javascript" src="http://192.168.70.130/wp-content/themes/nvapp2015_s/js/bootstrap.min.js,qver=4.1.pagespeed.jm.-kRHVQtEas.js"> </script>
<script src="http://192.168.70.130/wp-content/themes/nvapp2015_s/js/jquery.backstretch.min.js,,qver==4.1,Mjm.U1NgPaOuHw.js+nvapp2015-user.js,,qver==4.1,Mjm.AkFrXxuiYg.js.pagespeed.jc.P6xbyh4_sf.js"> </script> <script>eval(mod_pagespeed_nEk421u75r); </script>
<script>eval(mod_pagespeed_KWmGPAZujM); </script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://192.168.70.130/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://192.168.70.130/wp-includes/wlwmanifest.xml">
<meta name="generator" content="WordPress 4.1">
<link rel="canonical" href="http://192.168.70.130/">
<link rel="shortlink" href="http://192.168.70.130/">
<style type="text/css">.recentcomments a{display:inline!important;padding:0!important;margin:0!important} </style>
<style type="text/css" id="custom-background-css">body.custom-background{background-image:url(http://192.168.70.130/wp-content/uploads/2015/02/xhome-bg.png.pagespeed.ic.NgaIrW3Bbh.png);background-repeat:no-repeat;background-position:top left;background-attachment:scroll} </style>
<style type="text/css" media="print">#wpadminbar{display:none} </style>
<style type="text/css" media="screen">html{margin-top:32px!important}* html body{margin-top:32px!important}@media screen and (max-width:782px ){html{margin-top:46px!important}* html body{margin-top:46px!important}} </style>
</head>
<body class="home page page-id-7 page-template page-template-nvapp2015-page-home page-template-nvapp2015-page-home-php logged-in admin-bar no-customize-support custom-background"> <noscript><meta HTTP-EQUIV="refresh" content="0;url='http://192.168.70.130/?ModPagespeed=noscript'" /><style><!--table,div,span,font,p{display:none} --></style><div style="display:block">Please click <a href="http://192.168.70.130/?ModPagespeed=noscript">here</a> if you are not redirected within a few seconds.</div> </noscript>
<div id="page" class="hfeed site" style="position: relative; z-index: 0; background: none;">
<a class="skip-link screen-reader-text" href="#content">Skip to content </a>
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<h1 class="site-title"> <a href="http://192.168.70.130/" rel="home">NV </a> </h1>
<h2 class="site-description">NVWPDEVSPM03 </h2>
</div> <!-- .site-branding -->
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle" aria-controls="menu" aria-expanded="false">Primary Menu </button>
<div class="menu"> <ul> <li class="page_item page-item-7 current_page_item"> <a href="http://192.168.70.130/">Home </a> </li> </ul> </div>
</nav> <!-- #site-navigation -->
</header> <!-- #masthead -->
<div id="content" class="site-content">
<div id="primary" class="content-area">
</div> <!-- #primary -->
<input type="hidden" id="bg_image" value=" <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;})();pagespeed.criticalImagesBeaconInit('/mod_pagespeed_beacon','http://192.168.70.130/','O-_tWHm2s1',false,'qIBIt6eWWcg');
//]]> </c[q];++d){var> </a[q];++b)for(var> </div> <div class="backstretch" style="left: 0px; top: 0px; overflow: hidden; margin: 0px; padding: 0px; height: 100%; width: 100%; z-index: -999998; position: absolute;"> <img src="<script pagespeed_no_defer=" style="position: absolute; display: none; margin: 0px; padding: 0px; border: none; width: auto; height: auto; max-height: none; max-width: none; z-index: -999999;"> </div> </div> </body> </html>
WORKAROUND: If I disable pagespeed in the httpd.conf, the issue goes away.