Click to See Complete Forum and Search --> : using frames and search engine ranking
little_lisa
08-28-2003, 12:52 PM
I have been playing with frames on my web site.
The frames are on the index.html page on my site all other pages such as contact.html will be loaded into a frame on the index.html page
Problem being....when a page such as ....contact.html is entered from a search engine it will go directly to that page and there will be no frames on that page, more importantly no links to other pages on my site....hope you are with me!
So...is there any way i can use the frames on every page or at least change the name of the page as the site is navigated instead of it always being index.html
Thanx
Lisa
Sux0rZh@jc0rz
08-28-2003, 01:00 PM
not a frame guru but why don't you just take out the META tags so it won't be picked up by search engine?(the non-index pages that is)
little_lisa
08-28-2003, 01:51 PM
I need all pages to be ranked on search engines.
I make cakes etc so different keywords pick out different pages ie novelty cakes, wedding cakes etc etc
couchmonkey
08-28-2003, 03:45 PM
As it happens, I recently wrote some code for dealing with this problem....in my version, it displays a message asking the user to try the frames version if no frames are loaded.
Here's a sample page that is supposed to be displayed in frames:
<html>
<head>
<title>NOFRAMES!</title>
<script type="text/javascript" language="javascript" src="addframes.js"></script>
</head>
<body bgcolor="#AABBFF" onload="checkframes()">
<p>This is the content page.</p>
<p id="noframes">If you are using the non-frames version of the site, you
might want to switch to the <A href="frames.html">[FRAMES VERSION]</A>
- it works better!</p>
<p>Have a nice day!</p>
</body>
</html>
Here is the script to be saved as addframes.js:
// addframes.js by David Mitchell dtmitchell@shaw.ca 2003.07.28
// This script determines if a page is using frames, and if not, alerts the user
// that a frames version is available.
// Free for use and modification on non-commercial sites, please keep my info
// with the script.
// this if statement tries to ensure that the browser will support the script.
if (document.all || document.getElementById){
// if so, then we hide the tag with the ID "noframes"
document.write('<style type="text/css">')
document.write('#noframes{display:none;}')
document.write('</style>')
}
// this function checks for frames and displays something on the page if there
// are none, such as a message asking users to try the frames site.
function checkframes()
{
//if this page is it's own parent (i.e. the highest thing in the heirarchy)
//it must not be in a frame, so display the tag that has the id "noframes"
if ( parent == self )
{
document.getElementById("noframes").style.display="block"
}
}
The problem with this code? It will always open your home page...that is, it opens frames.html (or in your case index.html) and it will not keep the page the user just accessed in the frame, instead it will open whatever pages appear in the frames by default. I don't know how to solve that.
gizmo
08-29-2003, 03:02 PM
Have a look at the code on www.circlesestateagents.com - it uses frames, there is code to reframe an unframed page and other matters to enable search engines to get to the inner pages. Any bits you can't access let me know and I will assist. :)
shirtbloke
08-29-2003, 06:37 PM
Paste this bit of code between the head - head tags in the target pages, and they'll automatically load up the whole frameset.( assuming your top page is index.html)
<script language="JavaScript">
if (parent.location.href == self.location.href){
window.location.href = 'index.html'
}
</script>
I like using frames too - you get to have three pages worth of meta tags, titles, and content