Automatic re-direct to inline frames?

J

Jim Davis

If someone using a search engine selects one of my pages
that is normally displayed in an in-line frame, it will be
displayed as a full page instead. Is there a way to get it
to display automatically in the frame instead?

Thanks,
Jim
 
T

Ted Ljong

I have used this script in a 2frame page and it works fine.

Insert this into the head.
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">

<!--
var correct_frame = 0 + (parent.top ? 1 : 0);
if (self == top || !correct_frame)
top.location.href = 'mainpage.htm?frame1.htm';
-->

</SCRIPT>

Ted Ljong
 
K

Kevin

Unfortunately not. (You may want to print this) The
search engines are detecting and indexing words in the
framed pages. Therefore, they are not indexing your site
the way you want them to. To achieve the objective you
want, you may have to make some drastic changes,
depending on the size of your site. First, (recommended)
prevent the search engines from indexing the frames pages
by placing the following meta tag <meta name="robots"
content="noindex,nofollow"> or <meta name="robots"
content="noindex,follow"> in the head of each frames
page. If you don't want to do this, you can put a
hyperlink to your main page (jerry rig fix) on each
frames page reading something like "If you reached this
page via a search engine and want to access our site,
click here". Another good idea is to create a sub-web
with shared borders. The top is for your header and the
left, right or bottom can be for your site navigation
links. Simply copy and past the HTML from each frames
page into new pages in the sub-web. In the head of each
sub-web page (make a template for ease) paste the tag
<meta name="robots" content="index,follow">. This will
get each page indexed with the search engines and each
page will have navigation to the entire NON FRAMES
version. Here is an excellent example of a site I found
that can give you an idea of what to do and how it is
displayed. I recommend browsing the site, as it should
give you some great ideas.
http://www.assurancedriving.com/ I have also talked to
their webmaster and he is usually willing to help, if
asked. He can be emailed at (e-mail address removed)
 
K

Kevin

Disregard my last message. I tried the javascript
provided by Ted Ljong and it works. However, I had to
tweek it a bit. When you get to the part ('mainpage.htm?
frame1.htm';), be sure the page name and frame name match
accordingly. CAUTION: Sometimes redirects are viewed by
search engines as SPAM. Use the above script wisely.
 
J

Jim Davis

Thanks for your original message. I think it will do what
I need better than what I was trying to do. Follow-up
question though. What's the difference in the
parameters "follow" and "nofollow"? Does it make a
difference which I use?
 
M

MD WebsUnlimited.com

Kevin,

The search engines tear pages and look for content and links. They can not
determine script behavior.
 
T

Ted Ljong

I have used this script on several pages and it don´t seem to disturb the
search engines that I use. For example in a google ort altavista search for
sjukgymnast with 17500 hits my page is nr 6 on side 1, Läkare (=doctors)
with about 170 000 hits have nr 4 on side 5, this is todays ranking I have
had both higher and lower ranking . The page has a very good ranking in many
keywords so I am not afraid of using the script. I also has customers with
framepages that has a very good ranking.

Just wanted you to get the info about my experience of how the the script
has worked.
Ted Ljong
 
K

Kevin

The instruction index or noindex tells the robots to
either index or not to index the page. The instruction
follow or nofollow tells the robots to either follow or
not to follow the hyperlinks on the page. It is usually
best to have the robots follow the hyperlinks, as this
allows a better understanding of your content. You DO NOT
want to index frames pages unless you use the redirect
script provided by Ted Ljong.

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top