[Plugin: Google Analytics for WordPress] Output javascript before CSS delays the page load time
-
I’ve noticed that you do something similar to this:
add_action(‘wp_head’, array(‘GA_Filter’,’spool_adsense’),20);
I’m using several plugins that outputs CSS in the header using the “wp_head” action. But since you’re only using “20” as a value your plugin takes presedence.
According to Google Page Speed Firefox plugin, this could delay the time the page load.
I quote: “An inline script block was found in the head between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource.”
http://code.google.com/speed/page-speed/docs/rtt.html#PutStylesBeforeScripts
“The solution is to move the inline scripts to follow all other resources, if possible, like so:”
<head> <link rel="stylesheet" type="text/css" href="stylesheet1.css" /> <link rel="stylesheet" type="text/css" href="stylesheet2.css" /> <link rel="stylesheet" type="text/css" href="stylesheet3.css" /> <link rel="alternate" type="application/rss+xml" title="Say hello" href="front.xml" /> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> <script type="text/javascript"> document.write("Hello world!"); </script> </head>My suggestion is to use a **very** high value, instead of “20”
The topic ‘[Plugin: Google Analytics for WordPress] Output javascript before CSS delays the page load time’ is closed to new replies.