Forum Moderators: open
1. Javascript will reach a smaller audience than an iframe.
2. When you use layers (divs) all the information is in one document. There is both a search engine and a semantic value in using iframes so that separate topics are kept in separate documents.
3. If any of these scrollable windows hold a significant amount of information, using divs will fatten up the file size of the HTML. If there are many, it can require a prohibitive amount of download time.
<meta name="robots" content="INDEX,FOLLOW"> or NOINDEX, or NOFOLLOW in any combintion you want
Here you're looking at another difference between divs and iframes. If you use divs, then the whole document is treated the same way. Using iframes allows you more granular control of what the SE will index.
Each bit of content displayed in an iframe is actually an independent HTML document with its own URL. Because of this you can apply robots.txt and the robots meta tag differently in regard to each document. You can allow spiders to index some of the documents and not others -- or to follow links in some documents and not others. You can mix and match according to your specific needs in each case.
However, when you use divs you put all the information within one HTML document, at one URL. So you can only set up spidering and indexing restrictions the same way for ALL that information.
You have at least a couple resorts:
1. Use scripting to detect if the page is orphaned - if it is put it back into an iframe on its appropriate page. There's a javascript solution in message #21 of our Generic Javascript thread [webmasterworld.com]. It's for a regular frameset, but the logic is easy to adapt for an iframe. Server side scripting would be a surer fix if you can do it -- would work even if the user has js turned off.
2. Bite the bullet and include some basic nav in the orphaned page -- or you might also use javascript to write navigation into the doc only if it's not in an iframe.
One word of caution -- search engine spiders are not so good at following the initial src=page.html attribute of an iframe, although they certainly will follow any links that target that iframe and change the displayed document. So I'd suggest a straight HMTL link somewhere (site map perhaps) for any HTML docs that only appear in the src attribute of the iframe.