The Performance Beacon

The web performance, analytics, and optimization blog

Does the mPulse SCRIPT loader affect SEO?

google, mPulse and search engine optimization

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.

The difference with mPulse is that the IFRAME isn’t in the page’s static HTML. The mPulse script loader code is complicated specifically because it needs to handle various corner cases. It creates an IFRAME in JavaScript, and then injects that before the first SCRIPT node on the page.

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.

Our test

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 — — meets all these requirements, so in a few minutes we were able to validate.

The 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.

Our results

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.”>

This confirms that injecting an IFRAME into the document’s HEAD via JavaScript that runs after GoogleBot has finished parsing META elements does not make Google forget about the META elements.

Our recommendations

We recommend that you do two things:

  1. 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.
  2. 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.

Philip Tellis

About the Author

Philip Tellis

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.

Follow @bluesmoon