Jump to content

Recommended Posts

Posted

I have a site that uses a frameset. Whenever a visitor goes to the site without specifying a page, or if specifying /index.htm, everything's fine. But some people insist on using /Home.htm and then the home page loads without the frameset. Is there any HTML code that will force the Home.htm to load with the frameset if the frame isn't loaded?

 

I suppose I could just rename Home.htm to something else :)

 

Thanks,

Dan

Posted

Rename it something else and in your .htaccess file add a redirect for that filename to load your index page.

 

There are also scripts that you can use to load the frame set if a direct request for a page outside the frame set. Check www.hotscripts.com, you should be able to find something.

 

As an aside, frame pages are search engine unfriendly and not very popular anymore.

Posted
As an aside, frame pages are search engine unfriendly and not very popular anymore.

 

I've been made aware of this...I suppose that's why the Home.htm page keeps coming up linked from the search engines as that's where the content is.

 

I'm no web designer, so I'm reluctant to redo this website as it does have all of the content I needed to put out there. The frameset is nothing more than a navigation menu with a logo.

 

Any suggestions on how to get rid of the frameset without having to redesign the whole site?

 

Thanks,

Dan

Posted (edited)

Is the site in frames the link the WWW button takes you to? I would suggest using a PHP include for the navigation that would be inserted into each page automatically for you.

 

See this this post for more information.

Edited by TCH-Bruce
Posted

The method I've used before is Javascript-based and basically it checks to see if the parent frame has been loaded when the page within the frame is called. This can be done by checking to see if home.htm is at the top via the following condition, if self == top, then we know that home.htm is not within the frames.

 

Personally I prefer using the alternate method of checking via top.frames.length which checks to see the number of frames present at the moment.

 

Then point top.location.href to the appropriate frame page that you want.

 

My memory may have been rusty and this is just off the top of my head so let me know if it works. :P Hope this helps.

Posted

I agree with Bruce that framed pages do cause problems with search engines. However a couple of years back when frames were the popular thing, I did up a site based on frames and had pretty good search engine placements on all the popular ones.

 

It's always good to have an extra set of navigation, I agree and PHP sounds like a good and fast way of implementing it.

 

All this is if you still can't get your frame protection in place, otherwise visitors should be able to still visit any of your pages via search engines and get automatically redirected to within a frame. Good luck with it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...