Load speed of your site is important not only to comply to Google’s ranking algorithm and have a sound SEO friendly site but also to make your users to have a great experience on your site. There are some cases that advertising scripts that is embedded on the site which are usually rendered using Javascript, makes your site very slow. The problem is that some ad scripts load slow or sometimes failed to load making a slow rendering of the whole site. I also experienced it and its really annoying that the site isn’t loading yet because the page is waiting for the ads to load first. That’s why what I did is I load the ads script last on my site and make my content to load first.

Yup and here’s how:

  1. First, I get the ads script / code then put in a separate HTML file and upload it to my site (e.g. /myad.html).
  2. Then, I put the following code on the place where the ad is supposed to be placed:

    <div id='myadcode'></div>

  3. Then, I put the following code on the footer of the page (right before the </body> tag):

    <script type='text/javascript'>

    document.getElementById(“myadcode”).innerHTML=”<iframe src=’/myad.html‘ width=’480′ height=’70’ border=’0′ frameborder=’0′ scrolling=’no’></iframe>”;


On the code above, I assumed that the ads is a 468×60 banner.

On this method, the ad script will be loaded right after the browser reach the last part of the code up to </body> tag. Using the script on the 3rd step, it will replace the the <div id=’myadcode’></div> with the actual code that you saved on step 1 through the use of the magic ‘iframe’ which is written by a javascript using the getElementByID function.

I have tried it and I like the result plus my content on my site load first before the ads.

SEO Consultant and Programmer

0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Oldest Most Voted
Inline Feedbacks
View all comments
13 years ago


I think this trick will work only on a wordpress blog. There’s no such thing that blogspot blog can upload file like .htaccess, .php, or something like this trick because we don’t have an access to its directory or main root unlike wordpress.

13 years ago

Nice trick. it’s just that unfortunately we need the hosting to implement the above. so, I think it’s that special to have your own hosting only.