Dynamo wrote:
My site uses frames and some of the frame pages are ranked higher in
search engine rankings than the main page. When somebody clicks on the
link it takes them to the frame page and they don't see my page as it
should be viewed plus it displays a javascript error.
Ah, the joy of using frames.
I need a way using javascript so that when the link is clicked on in
either yahoo or lycos that it loads the main frame html page (not the
subframe html) and that the subframe html page is loaded into the correct
frame within the mainframe html page. Is this possible and how?
Option 1: Minimise the damage caused by frames
1. Create a new <frameset> document for every combination of pages that
might be viewed at once.
2. Make sure each has suitable <noframes> content
3. Make sure all your links are target="_top" and point to a <frameset>
document.
4. Write a robots.txt that asks search engines to keep out of the directory
you keep the documents intended to be viewed in the frameset.
Then you might consider something like:
if(top.location == self.location){
top.location = "http://www.example.com/frameset_for_this_page/";
}
Option 2: Get rid of the frames and use preprocessing, server side
programing or simple includes to include the common content in each.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is