Prevent orphan frames
If you have a framed site, search engines can frequently index a single frame. This becomes an "orphan" frame. If a user goes to that frame, they don't get to see the rest of your site.
You can put an orphan page back into its frameset. To do so, you have to send them back to your frameset again. You can't just send them to your index frameset page, because if you do that, you'll just take them back to your homepage. You don't want that. You want the orphan frame to be visible... but in the frameset. The page you send them to must write your frameset again, but uses the orphan page they've just accessed, and loads it into the body frame of your full frameset.
Important note Framed sites traditionally have a frameset that loads new, unframed pages into the body area. You can do this in NOF by making a framed home page; then you make zero margins pages for all of your subsequent pages; and, as you build your site, you make your nav bar and any links in the master border areas of the home page target the body. This will very reliably give you a framed home page and will change just the body frame when you click a link. I'll call this framing method, "Method 1".
Well, that's the traditional web mechanism for making framed sites. And you can do that with NOF if you choose to do so. However, it's not NOF's standard method.
So... If you don't consciously use the traditional web framing method described above, but, instead, just make framed pages in NOF, then you need to know that NOF deploys a very idiosyncratic method when you choose to make a framed site. And it can be used to your advantage!
NOF treats your site differently depending on whether your border frames have changing elements in them or not.
If your border frames have changing elements, it will load a whole new frameset for each framed page. (Well, it has to. If the border changes, then the border frame must reload!)
But if you are going to reload a whole new frameset for every every page, then I see no reason to make a framed site at all! Framed sites usually load an initial page, then just change the Body frame, leaving the rest, including the initial URL, intact. So, if you've chosen to make a framed site, I'm assuming you have done so for that effect, and thus, I'm assuming you have no changing elements in your master border.
If there are no changing elements in a border frame, then when you click a link in the border of a NOF site (eg a nav bar link), just the body frame will load, leaving the border frames unchanged and, therefore, not re-loaded. But... NOF has still created a discrete frameset for that page. It will most likely never get used since that frameset will be exactly the same as every other frameset in your site, including that of your home page. And when you click a link, the homepage frameset will stay put and just the Body will change (as happens with most framed websites). But the frameset for each discrete page is still there, even if it never gets used. That's the bit you can use to your advantage. I'll call this default NOF framing method, "Method 2"
So, to ensure that any orphan frame will be reloaded into its frameset, you will employ a different method depending on whether you have used Method 1 (normal web behaviour) or Method 2 (NOF's idiosyncratic, but useful, method).
All a bit complicated, I know. I do hope this is clear up to now.
I'm going to describe the method for re-framing your orphan pages in reverse order, since, if you are using NOF, you have probably used its default, idiosyncratic framing system (Method 2).
So... (re Method 2) For a "normal" NOF framed site (I'm assuming you have no changing elements in your master borders.)
The problem will arise if a seach engine references one of your Body frames.
Because each framed NOF page has its own frameset (with, therefore, its own discrete URL), you just need to reframe the Body frame within the URL for that page. So the code you need to use is quite simple.
Put this in the Head of any frame (probably your Body frame) that you think might get orphaned:
<script language=Javascript> if (top.location == self.location) { top.location.href = "yourFramedPageName.html" } </script>
...where yourFramedPageName is the name of your NOF framed page.
Easy!
______________________________________
For a traditional framed site (Framing Method 1)
This is a bit more complicated because each framed page doesn't have a discrete frameset. You have to re-create the master frameset, and insert the orphaned body frame within it.
Here's how:
Make a blank, zero margins page in your site called "master.html". Make sure it is in the same directory as your index page. Check in Publish View that it is. If it's not, then, in Publish View, drag it there.
Put nothing on it except something like this (my code for the demo here) in its Head:
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
origURL = parent.document.URL contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<frameset border=0 framespacing=0 frameborder=0 rows="111,*,57">')
document.write('<frame name="header" title="header" src="./header_index.html" scrolling=auto marginwidth="0" marginheight="0" frameborder=no border="0" NORESIZE>')
document.write('<frame name="body" title="body" src="' + contentURL +'" scrolling=auto marginwidth=0 marginheight=0>')
document.write('<frame name="footer" title="footer" src="./footer_intoframes.html" scrolling=auto marginwidth="0" marginheight="0" frameborder=no border="0" NORESIZE>')
document.write('</frameset>')
</script>
Get the frameset code from your index page. To do this, go to your index page in NOF, go to HTML View, click the Frameset tab (bottom of screen) and copy the frameset code.
(Just delete the bits that have the NOF info eg <--- [END Master Body Script] --->
Replace the src parameter in the Body frame code with:
src="' + contentURL +'"
Start each line of the frameset with:
document.write('
and end each line with:
')
Eg this line from my frameset:
<frame name="footer" title="footer" src="./footer_intoframes.html" scrolling=auto marginwidth="0" marginheight="0" frameborder=no border="0" NORESIZE>
became:
document.write('<frame name="footer" title="footer" src="./footer_intoframes.html" scrolling=auto marginwidth="0" marginheight="0" frameborder=no border="0" NORESIZE>')
All that might seem like a bit of work, but you only have to do it once for your site.
Now, in the Head of each page that might become an orphan, put this:
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> passpage = document.URL if (top.location == self.location) top.location.href="master.html?" + passpage </script>
(No changes are required in this bit that you put in each page.)
If you want to give your user the option of reloading your frameset, turn the script immediately above into a function. Like this:
<SCRIPT LANGUAGE=JAVASCRIPT> function forceframe() { passpage = document.URL if (top.location == self.location) top.location.href="master.html?" + passpage } </script>
...and call it from a Javascript link as I have done with Frame 3 of my demo.
That's it. Good luck!
_______________________________________ This page was written, and is maintained, by Dallas
|