Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!


Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 




From the folks who brought you High Rankings!

- - - - -

Loading External Html Into A Div Container

  • Please log in to reply
5 replies to this topic

#1 zeroten


    HR 1

  • Members
  • Pip
  • 2 posts

Posted 01 December 2011 - 07:53 AM

Hi all,

I've been searching through the forums but don't seem to be able to find this topic (possibly because everyone knows the answer apart from me who's a complete newbie to SEO)!

It's a simple pretty question. I have a <div> which acts as a container which loads html text from an external html pages into it (imagine 3 tabs - each tab loads in a separate html file into the same container). Is the text content in the external html files visible to search engines? If so, is it as visible as if it wasn't external or less visible? Or should I avoid loading external text like the plague?!

Thanks in advance for your help.


#2 Alan Perkins

Alan Perkins

    Token male admin

  • Admin
  • 1,648 posts
  • Location:UK

Posted 01 December 2011 - 08:01 AM

Hi zeroten

Welcome to the forums. bye1.gif

Chances are that the text content is NOT visible to search engines on the page URL that contains the DIV. However, search engines MAY find the three separate HTML pages that contain the text that will be loaded into the DIV, and each of those three pages may be separately crawled and indexed.

What exactly is the mechanism for loading the external HTML pages into the DIV?

#3 zeroten


    HR 1

  • Members
  • Pip
  • 2 posts

Posted 01 December 2011 - 08:20 AM

Hi Alan.

Thanks for the superfast reply and the welcome.

Well, it would be ajax I think. I haven't even started building the site so I was just thinking of ways to do things. My friend who wants the site wants it to be optimized for search engines but needs to be able to update the text content as easily as possible. I thought perhaps all the stuff like navigation buttons, calling scripts & stylesheets etc could be in the index.htm which he wouldn't need to touch then have really simple separate html files he could edit without breaking anything (!)

But no, SEO is a higher priority. I'm pretty sure I can make the main html pages pretty bomb-proof without the need for loading anything external, so you've told me all I need to know I think.

Thanks so much,


#4 Alan Perkins

Alan Perkins

    Token male admin

  • Admin
  • 1,648 posts
  • Location:UK

Posted 01 December 2011 - 08:35 AM

Yep, if you can do it without AJAX, that would be better.

#5 chrishirst


    A not so moderate moderator.

  • Moderator
  • 7,658 posts
  • Location:Blackpool UK

Posted 03 December 2011 - 06:32 AM

AJAX (javascript) is not allowed to retrieve content from a remote domain name. Cross Site Scripting (XSS) is blocked by browsers. The script has to be on the same hostname as the content is from, Google Adsense being one example on this.

You either use iframes or handle the includes server-side.

#6 qwerty


    HR 10

  • Moderator
  • 8,685 posts
  • Location:Somerville, MA

Posted 04 December 2011 - 12:41 PM

To add to Chris' point, if you use server-side includes, search engines will view the content in the div as part of the page. If you use iframes, they're probably going to index the source files as separate pages.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!