John Cletheroe's
PC and Internet Hints


Web Page Creation Hints and Resources - Integration of HTML Editing With a Web Browser

An extremely convenient method of editing the pages of a web site is to integrate the HTML editor with a web browser.

Then you can open your browser, open the home page of your site (the copy on your computer's hard disk, that is) and then use the hypertext links on the pages of your site to navigate to the page you want to edit (again, the copy on your computer's hard disk), select the browser's View > Source option and have the HTML editor automatically start up with the source file of the relevant page automatically loaded, all ready to be edited. Having made the amendments to the source file, you save it, close the editor and click on the browser's Refresh toolbar button to see what the revised version of the page looks like. Amending several pages is made extremely easy with this setup.

All this is not only possible, it is easy to achieve.

However, as far as I know it is only possible to achieve this with Microsoft's Internet Explorer (version 2, 3, 4 or 5). I can't make Netscape Navigator version 2, 3 or 4 (or Communicator) achieve the desired result, which is probably Navigator's sole drawback compared with Internet Explorer.

In Internet Explorer, the View > Source option will always use C:\WINDOWS\NOTEPAD.EXE to view the current page's source file. As explained before, this need not be the real Notepad program of course. There doesn't seem to be any option within Internet Explorer to change this arrangement, nor does the choice of program associated with the HTM and HTML extensions in Windows have any effect on it.

In Netscape Navigator version 2, 3 and 4 (and Communicator) it is easy enough to change the program used to display the source file to Notepad (or whatever you want). In version 3 this is done in the Options > General > Apps > View Source menu option; other versions have similar menu options. However, it is always a temporary copy of the source file which is presented in the editor, not the true source file. Unless you want to remember to use the File > Save As option and type in the correct filename every time you save the source file, this is not a viable arrangement. Communicator's web page editor is no improvement in this regard - if anything, it makes life more complicated.

There is one other essential factor required to achieve true integration with the browser. This is the ability to be able to use your page's hypertext links to navigate round the copy of your site on your computer's hard disk, then be able to upload the pages to the server and still have the links work properly there without having to be changed.

This can be done very simply, by always using relative URL's to reference any pages or graphics files within your site, for example in <A HREF> and <IMG SRC> tags.

For example, instead of writing a link from one page on your site to another page in the same directory on your site as:

<A HREF = "http://freespace.virgin.net/joe.bloggs/b5/minbari.htm">

(where joe.bloggs is your user name)

write it like this:

<A HREF = "minbari.htm">

You can move down to a lower directory (folder), up to a higher directory and even up and then down in one move, as in these examples:

<A HREF = "b5/minbari.htm">

<A HREF = "../minbari.htm">

<A HREF = "../b5/minbari.htm">

You can use exactly the same approach with graphics files.

Any links to pages or graphics files outside your site will have to start with http:// as usual and of course these won't work while you're offline. The only aspect of your site where this might be a bit of a pain is with hit counters.

For more examples of how relative addresses work, take a look at the source files of some of the pages of this web site.


As with all the other pages on this personal web site, all the information on this page is solely the opinion of the author, who has no connection whatsoever with any of the companies and organisations mentioned other than as an actual or potential customer.
Web Page Creation Hints and Resources

PC and Internet Hints


About this personal web site JohnCletheroe

EMail me

Most recently modified 21-Apr-07