Forum Moderators: open

Message Too Old, No Replies

"Forcing Frames"

isn't there a way to have frame content pages always load frame

         

Jas0n

3:12 pm on May 31, 2002 (gmt 0)

10+ Year Member



I am trying to win support for flattening my company's framed site for better SEO, bookmarking, etc... (maybe using ASP, or SSI).

But, as a fall back, I am investigating what can be done to avoid "orphaned" content pages in the SE. I vaguely recall seeing some information last year on some code that when you load a frame content page will force the frameset page to load as well. Anyone using something like this?

Can you post code.

TIA.

Grumpus

3:30 pm on May 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could probably write some simple javascript to identify the URL of the page in the window, if it's not the frameset page, but rather the "inside a frame" page, refresh to the frameset page.

The only problem here is that a bot won't be able to follow it. Well, there's another problem. If you don't have navigation controls in the page, but only in the frameset, the bot won't be able to get out, either.

I'd use SSI and include the "Navagation" page into the main pages and ditch the frames altogether.

G.

Jas0n

4:10 pm on May 31, 2002 (gmt 0)

10+ Year Member



I am going to at very least have some plain text navigation links put on every content page.

Having the outer navigation frames is more for aesthetics.. it just doesn't look good when the pages load without the outer navigation frames.

tedster

5:44 pm on May 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Can you post code.

I'm using this sucessfully on a site with many thousands of pages. The code is available on our "Generic JavaScript" thread [webmasterworld.com]. Look a bit below the half way mark for my post with the title:

FORCE MANY PAGES INTO FRAMES
with one simple script

> a bot won't be able to follow it...the bot won't be able to get out, either

It's true that a bot won't follow javascript navigation. However, I can't see a reason for a bot to find the parent frameset through this particular pathway. I don't really want the nav frames to be well positioned on the search engines.

You make a good point about having SOME navigation within the orphaned page. This also helps human visitors who may arrive with javascript disabled and would therefore be stuck in the orphaned page..

tedster

5:51 pm on May 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Afterthought: One of the side benefits of this method has been the ability to create links to ANY page and have it load in the appropriate frameset. You just link to the content page and let the script do the rest.

Without a script like this, you need to create a dedicated frameset document to link to a featured item that was deep within frameset navigation.

Jas0n

5:54 pm on May 31, 2002 (gmt 0)

10+ Year Member



Thanks Tedster, that sounds very cool. I'll try it out.

:)

Jas0n

2:34 pm on Jun 6, 2002 (gmt 0)

10+ Year Member



Including this in the head of the content pages seems to work fine in tests so far.

<SCRIPT LANGUAGE="JavaScript">
<!--
if (window == top) top.location.href = "Index.html";
// -->
</SCRIPT>

One odd problem is that MS FrontPage 2002 doesn't seem to want to display the page in the "Preview" however. All MS Frontpage shows is "The page cannot be displayed" in the Preview tab. However when I go to "File>Preview In Browser" the child content page calls the appropriate Frameset page and looks like it should.

Any idea on what setting to change in MS FrontPage to allow it to Preview correctly (I already have Java Script checked off in "Tools>Page Options>Compatibility>")?

TIA.

Jas0n

Black Knight

4:59 pm on Jun 6, 2002 (gmt 0)

10+ Year Member



I wrote a fairly detailed tutorial on frames that could be worth a once-over. There's a JavaScript frames solution, and additional tips on better techniques and tricks.

<url snipped>

For example: Forcing frames still leaves most visitors unable to bookmark specific deep-content pages, since it will be the Frameset page that gets bookmarked. Or the fact that frames sites won't work on the new POGO device (mobile mp3 player and full browser), nor webTV nor on other devices/clients.

The article covers all of the main limitations of frames, and suggests a workable solution that you shold consider.

[edited by: papabaer at 6:49 pm (utc) on June 6, 2002]