The MGA With An Attitude
MGAguru.com MGAguru.com
NEVER DO THIS with a Web Page Editor - WP-104

At 01:11 AM 4/6/05 -0400, Lew Phillips wrote:
"Somehow when I saved a page I made it put copies of the images in a self made subdirectory...."

Now THAT I can explain (as long as you don't mind another whole chapter in a book). I was once stuffed with exactly this same problem, which was the impetus for my taking over as webmaster for our club web site when the prior webmaster had it all screwed up.

<LONGEXPLANATION>

There is considerable difference between "Save" and "Save As". Many web page editor programs will do something obnoxious when you try to "Save As". You might be tempted to do this to create a new web page under a new name, but DON'T DO IT. These WYSIWYG editors are written for dummies. Not that everyone using them is a dummy, but it is assumed that the user will not take the time to learn how things work, which is why they are using a high level page editor. So the thing is programmed to act on the basis that the user does not know the consequenses of his actions.

Most people doing a "Save As" intend to create another web page with a different file name, after which they will be editing the new page to make it different from the first one. The new page may ultimately retain links to entities which are then common to both pages. This is in fact a very good reason for cloning a pre-existing web page, in order to keep much of the page format, which might include a menu with links, navigational buttons, or page headers in image form.

The problem (perceived by the software) arises when two pages then have links to the same entitiy, and in particular embedded items such as an image file. While editing one of the web pages you might sometime in the future edit the image, perhaps crop or scale or change change orientation or even save an entirely different image under the same name. This would change the content of the other web page which is linked to the same image. For someone who knows that they are doing, this could be intentional and exactly what you want. But remember that the software is assuming the operator is a dummy, and does not want to create this problem if it was not intended.

To avoid this problem, when a "Save As" is done the software will create a new subdirectory (folder) and will copy (duplicate) all of the embedded items which are in that (new) web page into the new directory. It also changes the liinks on the web page to point to the newly created directory. Then if anything which is embedded in either the new page or the old page is changed, it will not affect the other web page, because they will not be sharing the same files through common links.

The new directory is created within (under) the directory which contains the newly saved web page HTML file. If you happen to be doing this editing live on line, then the new directory is created on the web server under the directory holding the web page file, and everything works when visitors come to download the new web page. That was the intention of the action of the software.

However, .... the software is often more stupid than the operator (almost always). In particular the software really has no idea what is the intention or knowledge level of the operator. In fact the operator can (and often does) do things which will defeat the intention of the software and can cause problems. This WILL happen if you are doing the page editing off line and working on your local hard drive at the time (which you should always do). When you do page editing on line any visitor to the web site who happens to be looking at the page while you are editing will be seeing the current results of your editing, including any errors or omissions or whatever else may be incorrect when you are not yet finished with the editing. So you should always do the editing off line, and then upload the file(s) only when you are finished have verified that everything works.

So when you want to clone and edit a pre-existing web page to make a new one, you should start by making the new copy on your local hard drive. You could do this by downloading the original file from the server and re-naming it. If you already have the file on your local hard drive (likely a complete copy of the entire web site on your local hard drive), then you could copy the file and give the new copy a new name. If you intend to make a perfect copy of the original web page, including all of the original links unchanged, then the proper way to do this is to copy the file on the hard drive and give it a new name.

Now here is where the problem can arise. Suppose you are using a software page editor, and you load the original (old) file into the editor, and then you do a "Save As" to create the new web page with a different name (all this on your local hard drive). This "for dummies" software will then create a new directory (folder) on your local hard drive within (under) the current directory (new folder within existing folder). It also duplicates all of the entities embeded in that web page and stores these new files in the newly created directory (on your local hard drive). It then changes the links in the HTML code page to point to the new locations of these newly created files. The new link(s) then looks something like this:

<A href="c:\websitedirectory\webpagedirectory\newsubdirectory\newpicturefile.img">

When you view your new web page on your local computer, this seems to work okay, and you may be totally unaware of what the software has just done. Later when you have finished editing your new web page you may use FTP to upload the new HTML file (your new web page) to the server. You may very likely put this new web page in the same folder with the original web page. Then you may (erroneously) assume all of the links should work because the referenced image files are still the same as before (dummy). So you download and view your newly created web page with a browser to check and verify that it is working, and indeed it does work (or at least it works for you). The newly changed links in the new web page will be pointing to files on your local hard drive which really do exist, so for you all appears to be right with the world (dummy).

But when a visitor comes to your web site to view the new web page, they will download the HTML file with their browser, and some things will be missing. The newly changed links in the new HTML file are now pointing to a directory and file on the visitor's local hard drive which does not exist, and the visitor will not see the intended image in your new web page. The very same thing can happen to links to other web pages, or anything else which is embedded on your new web page. The end result is a lot of broken links and a new web page which is largely disfunctional for the visitors. A visitor might then send you an e-mail message mentioning that your web page doesn't work. But when you use a browser to view your new web page on line it does appear to you to be working. Then the entire world is screwed, and you may never have a clue that anything is wrong, let alone how it happened or how to fix it or how to avoid the same problem in the future.

</LONGEXPLANATION>

Unfortunately it is not the operator who is a dummy, but it is the absolutely stupid software which is the dummy and is creating these problems based on rash and invalid assumptions. The only way to avoid this is for the operator to become sufficiently informed (educated) in the way the software works such as to be able to work around the screwy mannerisms of the software to ultimately create the intended end result (a correct new web page). In other words, the operator has to become smart enough to compensate for the screw-ups of stupid software. If you can do that, then you are definitely not a dummy, and you most likely do not need this stupid software. In fact you may spend more time learning how to work with (and around) the stupid software than you would otherwise spend learning to build web pages without this software.

<PERSONALVIEW>
My take on all this is that most high level web page editor software (if not all of it) is in fact "software for dummies". But this does not mean what is intended by the software seller. What it really means is that the people who will buy and use this software are in fact dummies, because they are too ignorant to know any better than to use such software will most likely screw up their world. So "software for dummies" is by definition "software which can be sold to dummies", not that which could help dummies.
</PERSONALVIEW>

<EASYFIX>
The (simple) cure for your problem with misdirected links in new web pages is to NEVER use the "Save As" function in the web page editor software. If you want to clone an existing page to create a new one, you should first make a copy of the data file on your hard drive and give the copy the intended new file name. This way the new file will indeed be an exact copy of the original file and will contain all of the original features and links, unchanged. Then you do your editing on the new web page, and when finished use the "Save" function to save it exactly in the form you have intended. This is what I do when using a simple text editor to create ALL web pages.
</EASYFIX>

If perchance you do understand all of the idiosyncracies of the workings of the high level software, and you do in fact intend to create a new sub-directory with copies of all of the linked items in the new web page, then by all means feel free to do a "Save As" using the web page editor program to make it do your bidding. But of course this means you are not a dummy, and in fact you have learned much more than is required to create web pages without using the special software. You have also learned all about how the high level software works and does things.

My advice to people who are initially ignorant (not yet informed) is to better spend their time learning how to edit a simple HTML file. If they do that, then they will never have to spend time (possibly greater amounts of time) learing how the high level software programs work, and they will not be plagued with the problems being created by the really stupid web page edtor software.

HomeNext
Thank you for your comments -- Send e-mail to <Barney Gaylord>
© 2005 Barney Gaylord -- Copyright and reprint information