|
|
||||||||||||
|
|
Advanced Methods | No Frames |
|
|
|
||||||||
|
No Frames
What happens if someone who uses an old browser that doesn't support frames visits a page that uses frames? Since HTML browsers usually ignore what they don't understand, it's probably not surprising to learn that the old broswer should ignore everything inside the <frameset>...</frameset> container. (The only thing that should be inside the container is a set of frame tags that the browser also will not understand and will therefore ignore). Consequently, unless you plan ahead for such browsers, its user wouldn't see anything on the page. You can, however, provide alternate content that will be visible to such a visitor by placing it between <noframes> and </noframes>. Newer browsers that know what to do with frames also know to ignore anything inside <noframes>...</noframes>, so they won't display this material. The old browsers that don't understand frames also won't understand <noframes> or </noframes>, so they'll ignore the noframes tag. But they won't necessarily ignore what's between <noframes> and </noframes>. At a very minimum you can put a message there to the effect that the page uses frames and that the user's browser isn't frames-ready. The old browser should display this message. (Including at least a boilerplate statement along these lines is in fact a good idea as a courtesy to visitors who still may be using old browsers. That way the user won't just keep staring at an empty browser window, waiting for something that is never going to show up.) You might want to include in your noframes section a friendly encouragement for the user to upgrade to a newer, frames-capable browser. If you want to be more industrious, you can even include in the noframes section an alternative version of your page that doesn't use frames, or a link to a version of the page that doesn't use frames. If you decide to create alternative nonframe versions of your page(s) for these older browsers, you should be wary of what sort of elements you put on those pages. It's probably wise to stick to just text and simple images for such alternative pages. Most likely a browser that can't handle frames probably also can't handle a lot of other web goodies that have been developed since frames first began to be supported.
Alternative Ways to Size Frames
We can also choose to specify frame widths and heights in terms of a specific number of pixels. For example, we could have specified the frame set of Example 1 with:
Finally, what happens if we specify the dimensions of all our frames in percentages, but we aren't that careful with our math so the sum of the percentages that we specify for all the rows or columns turns out to be more than 100%? Then all the percentages will be uniformly rescaled by the browser so that the total is 100%. A similar thing happens if the total of our specified values is less than 100%.
|
||||||||||||
|
|
||||||||||||