san an to anto nou
san an to anto nou

Reputation: 75

SEO friendly alternative for an iframe?

I have some content I would like to share with other websites.

Currently I do this via an iframe:

<iframe width=“540”; height=“700” frameborder=“0” src=“http://www.energiekostencalculator.nl/forms/frame_tabs.php?first=yes&product=1&links=1&css=http://www.energiekostencalculator.nl/forms/susteen.css”></iframe>

This has two problems.

Who has the solution to these issues? Perhaps using jquery (see below), however I'm not sure Google would parse it and "see" the links...

<html>
<head>
<script src="/js/jquery.js" type="text/javascript">
</head>
<body>
<div id='include-from-outside'></div>
<script type='text/javascript'>
$('#include-from-outside').load('http://example.com/included.html');
</script>
</body>
</html>

Upvotes: 4

Views: 6026

Answers (6)

JRomero
JRomero

Reputation: 4868

There is a more "advanced" way of doing this but it might be limited by certain shared servers. Any other way I don't think you could solve your issues either by AJAX or iFrames. Since it looks like it's all html and javascript other than what gets parsed via php prior to the displaying of the page you should be able to load the actual contents of the site directly from server to server via fsocketopen and then do anything with that content from the other server. You could pregenerate code that could be used by your clients or customers on their servers.

Upvotes: 1

CodeVirtuoso
CodeVirtuoso

Reputation: 6438

Maybe you should create an API. This will definitely solve issue #2 - allowing publishers to style up your content any way they like.

And about issue #1 - SEO - I'm not sure. Don't understand the language of the site, but to my understanding you allow people to embed some kind of useful calculator to their own pages, while the content of their pages would generally stay unique, so this may or may not be SEO benefitial, I'd also like to know if any SEO experts read this.

Upvotes: -1

Quentin
Quentin

Reputation: 943579

A collection of links with no context isn't going to be SEO friendly, period. Spreading a chunk of HTML that just has some links in it around the web is just going to trash the PR of people who embed them. If you want SEO benefits, then you need unique (relevant!) content containing the links on each site linking in (otherwise welcome to duplicate content penalties).

Given that, you might as well just continue to use an iframe (assuming there is a benefit to showing the links to visitors to the other sites).

Upvotes: 0

Amjad Masad
Amjad Masad

Reputation: 4035

There are some better alternatives to iframe but its really up to the "other websites" to make it crawlable by creating HTML snapshots, Making AJAX Applications Crawlable.
As for your code example, Its not possible to load content from external domains, due to the Same origin policy.

Other iframe alternatives maybe a script tag, which most widgets use, where you tell your content users to embed your widget (script tag) into a parent div which will hold the content, and when your script loads it will automatically fill its parent element, with content.

Upvotes: 1

sunn0
sunn0

Reputation: 3046

Have a look at how TripAdvisor does it - a static link and then javascript to replace it once the page has loaded.

<div id="TA_rated459" class="TA_rated">
<ul id="JRrkXsd6H" class="TA_links GYO6Zcd">
            <li id="IN1Gc4AMw8T" class="zQkgIs4xdv"><a href=http://www.tripadvisor.com/Hotel_Review-g294207-d501440-Reviews-Ngong_House-Nairobi.html>Ngong House</a></li>
      </ul>
  </div>
<script src="http://www.jscache.com/wejs?wtype=rated&amp;uniq=459&amp;locationId=501440&amp;lang=en_US"></script>

Upvotes: 4

Steve Criddle
Steve Criddle

Reputation: 163

I think you could probably have a DIV with overflow: auto; (and specify dimensions). Then the HTML can be inside the DIV (and so part of the page) rather than in a separate file.

Upvotes: -1

Related Questions