The old bad web site
I will convert this
bad web site to a good one. The directory contains the following files:
frameset.htm
menu.htm
page1.htm
page2.htm
top.htm
Notice that I have, as is common, included a meaningless extra frame
for advertising something. I'm advertising myself (of course :-)!
This type of extra frame is however very common, so I have included
it to show that it doesn't matter for the conversion. It will not cause
any extra work (could even be more extra frames)!
Step 1
The first step is to identify the real pages and here it's easy: page1.htm
and page2.htm. These two files contain the main contents of the
pages and the rest is only cosmetic add-ons. I rename these files by adding
p_ first in their names. The directory will then look like this:
frameset.htm
menu.htm
p_page1.htm
p_page2.htm
top.htm
Step 2
Next step is to copy the frameset.htm document (which is often called
index.html to become the default page) to files that we give the old names
of the real pages (page1.htm and page2.htm). Then we
remove the old frameset.htm because it's not needed anymore:
menu.htm
p_page1.htm
p_page2.htm
page1.htm
(copy of the old frameset.htm)
page2.htm
(copy of the old frameset.htm)
top.htm
The reason to reuse the old names is that now we don't have to rewrite
the old links in the menu and the pages. If they pointed at (e.g.) page1.htm
before it will be right also after the change!
Step 3
The contents of the new frameset documents needs to be adjusted! The
file 'page1.htm' will be changed like this:
Before the change
<TITLE>Bad example</TITLE>
<frameset rows="60,*">
<frame src="top.htm">
<frameset cols="30%,*">
<frame src="menu.htm">
<frame src="page1.htm"
name="p">
</frameset>
</frameset>
After the change
<TITLE>Good
example, page 1</TITLE>
<frameset rows="60,*">
<frame src="top.htm">
<frameset cols="30%,*">
<frame src="menu.htm">
<frame src="p_page1.htm">
</frameset>
</frameset>
The red, bold text is what has been changed! (Not much, ehh?)
Step 4
The last thing is to correct the links in the rest of the files (not
the FRAMESET files):
menu.htm
<<- Should be corrected
p_page1.htm <<-
Should be corrected
p_page2.htm <<-
Should be corrected
page1.htm
page2.htm
top.htm
<<- Should be corrected
Before the line <BODY ...>,
<BASE TARGET="_top"> should be
inserted and then all TARGET="something" should be deleted. The easiest
is to search for TARGET and delete everything you find that looks like
TARGET="something" or TARGET=something
The file menu.htm should be changed like this:
Before the change
<BODY>
<P><A HREF="page1.htm" TARGET="p">Page
1
<P><A HREF="page2.htm" TARGET="p">Page
2
After the change
<BASE
TARGET="_top">
<BODY>
<P><A HREF="page1.htm">Page
1
<P><A HREF="page2.htm">Page
2
The red, bold text is the new stuff and the red, italic text (before
the change) is what I removed. When the same changes have been made to
the rest of the files, the site will be fully converted!
Shall I show one of the real pages also? (p_page1.htm):
Before the change
<BODY>
<H1>This is page 1</H1>
<P><A HREF="page2.htm">Page
2
After the change
<BASE
TARGET="_top">
<BODY>
<H1>This is page 1</H1>
<P><A HREF="page2.htm">Page
2
There was nothing to remove here, but there can be in your files so
always search for TARGET!
The new GOOD web site
This is how the
new good web site will look like. The directory contains the following
files:
menu.htm
p_page1.htm
p_page2.htm
page1.htm
page2.htm
top.htm
This is really quite little work to make it possible
to bookmark and link to your pages, something that MANY visitors find very
important.
And in fact, isn't that what the whole concept
with HTML is built on? I.e., with links referring to own or others pages..
index.html
If frameset.htm (the old site) was actually
called index.html before the change, then page1.htm is
the file that should be called index.html now. But, rather than
renaming page1.htm to index.html, you may want to use
a link (or a copy), to avoid having to change all links pointing to page1.htm