Forum Moderators: open

Message Too Old, No Replies

iFrames Compatibility

         

wfernley

8:58 pm on Apr 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have never used iFrames before because, well I don't like frames ;) but I now have a project where I will need to use them.

I was curious, how compatible they are with modern browsers?

Thanks

Wes

Little_G

9:00 pm on Apr 26, 2007 (gmt 0)

10+ Year Member



Hi,

I don't know of a browser that doesn't support frames.

Andrew

Dabrowski

11:05 pm on Apr 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Support it fine, not recommended for SEO reasons.

You have to use a loose DTD though, they are defunct in STRICT and XHTML.

encyclo

12:23 am on Apr 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lynx doesn't support iframes or frames, nor does any non-graphical user agent such as search engine spiders. The frame is treated as a separate page. All graphical browsers post Netscape 4 support iframes, so no problems there.

A common mistake is to use an iframe instead of an include for navigation. This makes it extremely hard for spiders to navigate around your site unless you have secondary navigation on your main page. You can still use iframes, but ensure you site works well without them. Don't forget also to provide alternative content for those with iframes disabled:

<iframe src="page.html" width="100" height="100">[b]<p>Alternative content here</p>[/b]</iframe>

Xapti

3:25 am on Apr 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



People keep mentioning SSI over iframes, but don't people realize that may site-builders don't have an SSI option?

When it comes to bot usability, what sort of methods can be done to get them to see links included in the iframe?
Can you have display:none, or visibility:hidden, and they will see it? What about z-indexed under the entire page, or in a really small font size at the bottom of the page or something...

Dabrowski

9:45 am on Apr 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take encyclo's example above, and do this:

<iframe src="page.html" width="100" height="100"> 
<p>Alternative <a href='page.html'>content here</a></p>
</iframe>

Now anything that doesn't support IFRAMES, including the spider, will see a link to the actual page. But for users that support it, they won't just the actual IFRAME.

daveVk

12:07 pm on Apr 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<iframe src="page.html" width="100" height="100">
<p>Alternative <a href='page.html'>content here</a></p>
</iframe>

Be careful with this approach, spider will index page.html as a separate page. Search engine users directed to page.html will not find content useful unless it happens to be self contained and links back to rest of site, it probably will not have any navigation, banner, title tags etc.

wfernley

1:35 pm on Apr 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I will actually be restricting the pages in my robots.txt file as I don't want SE's seeing the pages.

Dabrowski

2:05 pm on Apr 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, then don't worry about it.

As for the independant page thing, I use a frame puller on sites I have done in this way. That way if they hit the page directly, it transparently pulls itself into the parent page.

But in this case no matter.