Alucard Inchoate Ltd Alucard Inchoate Ltd

Frames or Not

Frames are used to display more than one web page at one time. They were introduced in Netscape v2, and followed soon after by Internet Explorer v3. The added functionality was a quantum leap, but it didn’t come for free. There are a number of hidden dangers in using frames which can lead the unwary into disaster.

The most common use of frames is to produce an index, usually on the left, which displays the indexed files on the right. The advantage of this is the code for the index is only loaded once, and does not need to be loaded with every web page. This saves on downloads, and leaves a consistent index, as its only one file. The homepage is set to be the frames manager, which then loads the default left and right sides and all is well.

All is well until you try to add the homepage to a search engine. Most search engines will follow the links in the frames manager, and index the pages throughout the site. The pages throughout the site are more likely to be more relevant to a users searching needs, and so the pages inside the frames manager appear higher on the search engines outputs. The user clicks on the reference, and is given the information, but without the frame which holds the index there is no navigation, and the users can’t get out of the page. The user then gives up in disgust, and never visits your site again. A potential customer lost.

This is a simple scenario where, through no real fault of the designer, luck has conspired against you. But life is like that, and the job of the designer is to reduce that risk.

What is the solution?

Some pages work well in frames, and some do not. This site has been built without using them, but that does not mean we will not use them.

During the design phase assess the impact of frames. Ask yourself if the site will be greatly enhanced by their use. If there is a real benefit from using them, such as the style you have chosen takes too long to download without using them, then build using frame, and manage the risks.

There are two ways to manage the risks. Stop the pages from being indexed in the first place, or check that the page has been loaded within its frame, and if not, reload the frame.

Stop the indexing

This is the easiest to achieve, but could have a detrimental effect on your sites ranking on search engine queries. Pages can be excluded by using the robots meta tag. For example, adding the line below into the head section of your web page will prevent the search engine from adding this page to its index and links on the page will not be followed.

<META name="robots" content="noindex, nofollow">

This will limit indexing of pages to only the ones which you want. This just means that the remaining pages will need to be relevant to your expected search criteria for you to get any hits from the search engines. This is best achieved by writing a short descriptive article about you site, and adding this in HTML into the <noframes> section of the frame manager. It will even come in useful if anyone is using an old browser, as this is what will be displayed on their screens. This text will be indexed by the search engine, and should help you score better against your target search phrases. More information about the robots meta tag can be found at

http://info.webcrawler.com/mak/projects/robots/exclusion.html

Check and rebuild the frames.

This does not have any detrimental effect with the search engines, but does require you to add JavaScript code onto your web page. This can fail because older browsers do not support JavaScript (but they don’t support frames either so this is not a real problem). But also because the firewalls that businesses use to protect their networks usually strip out JavaScript before it gets to the users browser, negating the effect of the script.

A simple script to achieve reloading of the frames page is listed below. This works fine going forwards, but the user will find great difficulty in using the back button, making them effectively stuck on your site.

<script>
if (parent.location.href == self.location.href)
{window.location.href = "parentFrameHtm"}
</script>

Replace the variable parentFrameHtm with the file name of the frames manager you wish to load.

There are better solutions to the problem, but they also tend to be more complex and more bulky to implement, so they will not be discussed here.

 
Previous - Web Design
 
 
You may contact us by telephone on +44 (0)1942 723111 or by post to
Alucard House, Willowfield Grove, Ashton, Wigan, WN4 9NN, England.

Home | Software | Products & Services | Hosting Plans | Hosted Sites | Design Help | Lessons
Alucard Inchoate Ltd, developers of PC Solutions since 1979.