Customers sometimes ask us if the mPulse SCRIPT loader affects their Google rankings — and sometimes someone just claims that it does. For example:
an iframe in the <HEAD> will prevent Google from reading meta tags
A thread from May 2016 on the Google forums seems to validate this logic.
We don’t dispute that this may in fact be the case for the page’s static HTML. If the page’s markup contains an IFRAME in the HEAD before any META elements, then some HTML parsers will automatically close the HEAD and start the BODY.
We’d tested this on every browser that we could get our hands on, but not specifically against the GoogleBot, so in June 2016, we decided to test this out.
We needed a website that was using mPulse, had a META description element with content different from the text of the page (this is important), and was being regularly indexed by Google. Our website — www.soasta.com — meets all these requirements, so in a few minutes we were able to validate.
The soasta.com page has a few META elements at the top, then a SCRIPT node, a few CSS LINK nodes, then the TITLE followed by the META description, followed by the mPulse SCRIPT loader.
Based on the SCRIPT loader logic, the IFRAME would be injected before the first SCRIPT on the page, which would put it above the META description element. There were two possibilities for the GoogleBot:
- If the IFRAME were stopping Google in its tracks, then Google’s search results would show the text content of the page.
- If Google was not being stopped by the IFRAME, then Google’s search results would show the content of the META description element.
Google’s search results for SOASTA shows the following text:
SOASTA’s powerful load testing and performance monitoring solutions give you a crystal-clear view of the relationship between end-to-end performance, user …
This matches exactly with the META description element:
<meta name=”description” content=”SOASTA’s powerful load testing and performance monitoring solutions give you a crystal-clear view of the relationship between end-to-end performance, user behavior and business goals, and provides the actionable intelligence.”>
We recommend that you do two things:
- Always put the mPulse SCRIPT loader tag as high as possible in your page, but after the TITLE and META elements. Not just for SEO, but because this allows the browser to identify important things, such as the page’s character set, before it does anything else.
- If you use any third-party script on your site, and if you care about your site’s performance, then you should use the IFRAME loader technique to load the third-party script.
About the Author
Philip Tellis is a geek who likes the computer to do his work for him. He is the primary author of boomerang, and plays around with web performance, scalability, security and analytics.