Richard Waller
Thoughts on Frames
You may think that seeing data in a frame
is like looking at life through a small porthole
Quick Hints
Introduction to Frames
Frames are available for nearly all of the of the surfers who will look at your website. They are different from the usual bland page, are interactive, and can be colourful.
They are often used to maintain your own website on the display while accessing material on other websites. You can prevent other people doing this with your material with a frame buster routine available on my Javascript Examples page. But if you do not mind, make sure each of your pages is branded with your own name address and logo.
You can have as many frames showing on the display as you wish, but it is usual to limit this to three or four. The way it works, there is always a frameset page which is the page referenced by the URL. The entries on this header specify the layout and frame-names of the frames that are displayed. You could call them Top, Left, Right, and Bottom. Or you could choose other names.
Besides the frame-names, you also specify what the initial contents of those frames will be. In use, clicking a link within the pages will allow any available page to be displayed in any frame by specifying TARGET="frame-name"
Thats the easy part. You can make it quite sophisticated if you wish. The demo frames here show some of these features.
Five good things about frames:
- There is a consistent heading which stays on the top of the display,
- There can be a consistent menu of the goodies available, instantly to hand,
- As an option you can have the option menu scrolling independently, although this is not very usable.
- You can have a footnote on the display if you must,
- The surfer can alter the position of the frames by dragging them with the cursor, if you wish to give them this facility. On this demo you can try it now, using the border to the left of this frame.
Seven not-so-good things about frames:
- Frames are often very slow to load, and at peak times may not load the content of all the frames correctly,
- The BACK function on browsers may not work correctly around frames,
- The TITLE statement will be that of the Frameset page, so bookmarks and history of individual pages will not be helpful,
- Every menu item which is a link outside the frames should be marked as TARGET="_top", and it is very easy to forget to do this, leading to the well-known frames-within-frames anomaly,
- The 50% of surfers who have 640 wide displays, or have decided to use larger font sizes, may have difficulty in seeing some of the material in any of the frames. In any case there may be insufficient material displayed in the main content frame to make for pleasant reading. Horizontal scrolling is always a no-no.
- Long documents are better displayed on a full screen where proper attention can be paid to readability and layout.
- You have to remember that you have to click in the frame you want before trying to print it.
There are other people who are not so keen either:
http://www.useit.com/alertbox/9612.html
- Why Frames Suck (Most of the Time) by Jakob Nielsen
A suggested layout
A suggested layout is illustrated in this page. To see the code that we are talking about, use View | Source which opens another window with the header page code displayed.
Key features include:
- The URLs of my frame pages are grouped together alphabetically. In my case the frame-names and page URLs are:
|
Header Frame Name: | 40dem | Contents: | 40dem.htm
|
|
Top Frame Name: | 40 demtop | Contents: | 40demtop.htm |
|
Left Frame Name: | 40demlft | Contents: | 40demlft.htm
|
|
Right Frame Name: | 40demrt | Contents: | 40frames.htm |
|
Bottom Frame Name: | 40dembot | Contents: | 40dembot.htm
|
- I have also provided an automatic link to the header frame, in a page named frames.htm, which is easier to quote when talking about frames to my friends,
- In the Frame-Header, the <NOFRAMES> section gives a link for the surfer to go direct to 40frames.htm which is the content, and is completely usable without the frames,
- In the Top-Frame, and in the Left-Frame, there are similar options as in the <NOFRAMES>
- In the Left-Frame, any link outside the frame structure is shown as TARGET="_top". _top (note the lower case) is one of the four reserved words for the TARGET command:
| _top | load this link at the top level |
| _blank | load this link into a new, unnamed window. |
| _self | load this link over yourself. |
| _parent | load this link over your parent. |
- An item in Left-Frame to List of Contents is valuable during testing of the page to Reload/Refresh the page to see the modifications you have made.
- The 40frames.htm page is complete in itself with a copy of the page heading, list of contents, and also the footer that is at the end of all my pages. There are internal links from the page list of contents to the sections, and a pretty [TOP] image-link at each section head back to the list of contents.
- External links from 40frames.htm are marked TARGET="_top" which does no harm if used in a full screen mode, but removes the frames if used in frames mode.
Frames on the Homepage
On a homepage, frames are an added complexity and will normally result in slow access. We therefore recommend not to use frames in the Homepage.
If you must use frames on the Homepage, then be aware that Search Engines will not be able to access any of the material within the frames. So the only thing the search engines will see is on the Frameset page. On the header page therefore:
- A proper and meaningful TITLE should be provided; this will probably appear in the search engine listings,
- META statements for Description and Keywords should be provided,
- A full text description of the site should be provided as part of the <NOFRAMES> section,
- For convenience you can use the same words in the Title, Meta Description, and Text,
- There should be links clearly shown as part of the <NOFRAMES> section to each of the key pages that you want the search engines to index.

URL: http://www.waller.co.uk/frames.htm