When you spend a lot of time building up a Web site, sometimes it can be frustrating to link to an external page and know that your readers will leave and possibly forget about your site altogether. But if you put a small frame on all your outbound links, you can be sure that they will remember your site.
Building the Templates
First you have to think about what your frame will be like. It's good form to keep it small and unobtrusive. And you should include both a link back to your site, and a link to turn off the frame if your readers find it annoying.
Then build the basic format for the top frame. I decided to make a small frame with just a link back to my site and another link to turn off the frame:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Navigation Frame</title>
</head>
<body bgcolor="#cc99ff" link="#ffffff" vlink="#ffffff">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<td><a href="">Return to the HTML Site</a></td>
<td align="right"><a href="" target="_top">Remove this frame</a></td>
</tr></table></body>
</html>
Note that the two links are blank because they will be built with the CGI using variables.
The frameset code I'll use for these pages will look like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>HTML Site Framed Link</title>
</head>
<frameset rows="30,*">
<frame name="top_nav" src="frame.cgi?top=y&url=$url&refer=$refer" marginwidth="10" marginheight="10" scrolling="no" frameborder="no" noresize>
<frame name="" src="" marginwidth="10" marginheight="10" scrolling="auto" frameborder="no">
<noframes>
This link is framed, <a href="">click here</a> to see the page without a frame.
</noframes>
</frameset>
The source of the top frame is built by the same CGI that builds the frameset.

