Maintaining a web site






Introduction

To make it clear from the outset, this document is not intended to be a guide to HTML (HyperText Markup Language - the language that tells your web browser how to display the page). If that is what you are after then we suggest a good book and if you are looking for a suggestion then try "HTML for Dummies." E Tittel et al. IDG Publishing, Inc. 3rd Edition 1997 or for a more in depth approach try "HTML The Definitive Guide". C Musciano & Bill Kennedy, O'Reilly & Associates, Inc. 2nd Edition 1998.

If help with the actually HTML is what you are looking for then there is also lots of information and articles published on the web itself. Just try one of the big search engines like www.yahoo.com and search on HTML. You'll probably find everything you need to get you going.

The newsgroups can also be a valuable resource. If you are having problems one thing is for certain, that you will not be the first. You will probably find the answers to every question you might have by reading through other peoples queries. There are a number of newsgroups devoted to web authoring but try comp.infosystems.www.authoring.html, or alt.html.writers. You will need to use your newsgroups client to access them (this is normally also your email client).

What this document is intended to do is give a few pointers on building your site, explain how to 'publish' your web site and how to maintain it thereafter.

Back to Beginning of page





Build it locally

It is possible to build and maintain a web site remotely on the server itself. This is however a time consuming method of web maintenance and can lead to problems with version control i.e. what do you actually have on your web site.

Therefore we would suggest you build your whole site on your own PC. This will enable you to view and check your own pages before you unleash them on the rest of the world. Better to make sure they work first before others tell you.

To build your site locally, simply create a directory called 'www' for example. You will now treat this as the first directory on your ISP's FTP server, i.e. the directory you will upload your finished web site into.

Depending on how big your web site is going to be, to make life easier for yourself we suggest you create subdirectories within this which will contain the various sections of your web site. Even if it's small, you may wish to keep graphics separate from the html pages, so create at least one subdirectory called say 'graphics' in which to put your images. In which case the directory tree of your web site would look like this:

The first page of your web site, or the 'home page' should nearly always be titled index.html or index.htm. Save this in your www directory as your www directory is your local copy of the first directory on the server.

Most servers are configured to issue the 'index' page whenever the site is accessed if no file path is given. This makes a lot of sense as it means that visitors do not need to know what you called your home page, they can just access it automatically by typing in just your web address. Check with your ISP if you are not sure but this is very common practice.

Back to Beginning of page





Use relative links

When building your site locally use relative URL's wherever possible. At this point it may be worth quickly recapping the three key components of the URL looked at in the document "WWW and FTP Contrasted" as you will need to be familiar with these to understand the next few paragraphs. The first part, http:// = the protocol, the second part, www.name.com = the address of the remote server, the third part is everything after the first forward slash / = the file path to the relevant file.

So if your index page wants to show an image1.gif that is in your subfolder 'graphics' the relative URL to it from the index page would be:

  • ./graphics/image1.gif

When using relative URL's it is important to understand some simple DOS directory navigation commands.

  • ./ means current directory
  • ../ means go back a directory

In the above therefore the ./ means from the current directory, go forward in to the folder graphics, and then get the file image1.gif. If you decide to keep all your files in the one directory then the relative URL would simply be the file name on it's own as you won't have to go anywhere to get it (metaphorically speaking).

The full URL to the graphic when your web page is on your ISP's server would actually be:

  • http://www.name.com/graphics/image1.gif

but if you use this URL in your HTML code you will not be able to test that the image displays until your web site is on the server.

With these two simple commands of ./ and ../ (you can omit the ./ from your syntax but it is good practice to use it) it is possible to show graphics and set up relative links to every document on your web site. For example, if the directory structure of your web site looked like this:

and index.html wanted to link to file1.html in the directory 'information', the relative URL would be:

  • ./information/file1.html

If file1.html wanted to display image2.gif contained in the 'graphics' directory then the URL would be:

  • ../graphics/image2.gif

To explain, the ../ instructs the server to go back to the www directory, then go forward into the graphics directory and retrieve the file image2.gif.

If file2.html wanted to link back to index.html (linking subpages back to your home page is common practice) then the URL would simply be to go back a directory and display index.html as follows:

  • ../index.html

It will pay dividends to understand these principles even if at first sight this may appear complicated. Incorrect URL's are the most common reason why graphics do not display. HTML is after all a computer language. Computers are dumb, they do exactly what they are told. Tell them to do something wrongly and they will do exactly that.

You may of course use some form of HTML editor, in which case it may do all of this for you. However, there is no substitute for understanding the code behind your web page. It is not uncommon for even the leading HTML editors to insert code at their own behest. Depending on how complicated your web site is, it is very common for some WYSIWYG (What You See Is What You Get - but not always) editors to display the web page in a completely different manner than how your web browser will actually show it. If you do not take the time to understand HTML it will be difficult to correct any errors should they occur.

If you follow these principles once you have written your web site on your PC it's time to make sure all the links work and all your graphics display. You can view it locally by simply double clicking index.html which will then be displayed by your web browser. If you have used relative links you will also be able to navigate throughout the site to make sure it all works.

Back to Beginning of page





Use lower case

There is probably one more very important tip to offer at this stage. Trial and error normally gets the message across but to save a whole lot of frustration, always, always use lower case for file and directory names! You can then make sure you write all the URL's in your HTML code only using lower case.

This can be absolutely critical. Nine times out of ten your web page will be uploaded to a UNIX computer. UNIX is simply another operating system as Windows® is. There is however one critical difference between them for our purposes here. UNIX is CASE SENSITIVE!!! Never forget this.

When working in Windows®, either of these following URL's will display the graphic image1.gif:

  • /graphics/Image1.gif
or
  • /graphics/image1.gif

On a UNIX platform, if your file name is actually Image1.gif (note capital I) then the second URL simply will not work.

To illustrate the point try saving two files in the same directory in Windows®, save one file as image1.gif and save the other as IMAGE1.GIF - you can not do it as Windows® is case insensitive. It will treat them as being the same file, not so on UNIX.

For this reason it has become common practice when working in a UNIX environment to only use lower case, unless there is a very good reason not to. The default option when sending files using Terrapin FTP Browser is to convert files to lower case automatically.

This option can be switched off so that the case is maintained as it was saved within Windows® (see View... System Options.... Transfer Tab), but this can be dangerous. As Windows® is case insensitive, there is no guarantee that the file will actually be saved with the case you type. This is not a criticism as it does not matter within Windows®.

Following this simple advice could save hours of frustration. Amongst new web authors, case issues have to be the most common reason why things do not display as intended. If one is not aware that case is an issue, it is possible to end up blaming everything without finding the real cause of the problem.

Back to Beginning of page





Uploading for the first time

If everything is working locally then you are ready to 'publish' your web page on the Internet. What this entails is quite simply uploading the files from your PC to your ISP's FTP server so that the world can connect to your web site.

The upload procedure for ISP's does obviously vary, although most follow some similar methodologies.

The first thing you will need to know is the address of the FTP server. This may or may not be your ISP's publicly accessible FTP server which will normally have the address of ftp.ispname.com or .co.uk. However, it is more common that the 'ftp' at the beginning will have been replaced by some prefix to illustrate that it is their FTP server for web sites. For demonstration purposes here we will therefore replace 'ftp' with 'prefix' and assume that your ISP's server address is something similar to:

  • prefix.ispname.com

You will not be able to connect to this server using the 'anonymous' login (the anonymous login is simply a standard used for connecting to publicly accessible sites - see the document "So What's Out There" for a brief explanation). You will normally need to connect using a username and password. Again nine times out of ten this will be the same username and password that you use to connect to the Internet generally.

Using Terrapin FTP Browser, the new connection dialog (click Server.... New Connection from the menu or from the toolbar) should look something like this:

Most often, the server will automatically place you in your own private directory, so you will not need to know the file path. The 'Ftp Site' window in Terrapin FTP Browser will look something like this:

Then open the file tree in the local view to your www folder and then copy the files up to the server by selecting them and dragging them across.

If your site is quite large and has a number of subdirectories you may wish to use the directory drag drop functionality of Terrapin FTP Browser. If you do, remember to drag the www directory to the root of your ISP's FTP server as shown here.

If you drag it to the yellow www directory then you will create your whole web site one directory down from where it should be. This works in exactly the same way as Windows® Explorer so try some directory drag drops locally first if you are unsure.

One other point if you are dragging your whole site up in this way, if needed, make sure you change the name of your local www directory to exactly the name that your ISP has set as the first directory on the server. This is important as your ISP may have a naming convention that you need to follow or it may be that you do not have the correct permissions to change the first directory name.

Once you have uploaded, if nothing else than for peace of mind, refresh the view on your FTP site (either select Folder.... Refresh from the menu or click from the tool bar) if you can see all of your web site files, including all .html files and your graphics files then you know that you have uploaded your site successfully.

You may wish to save the Site Map for later reference (you will automatically be prompted at the end of each session). This is a unique feature of Terrapin FTP Browser and can be very useful. Firstly it will provide you with a record of what your web site contains, and will enable you to browse it off-line whenever you wish. This will come into it's own when maintaining your web site as you will always be able to check for differences between your local copy and that on your ISP's server.

What happens from here depends on your ISP. With some you can view your web page immediately with your web browser. With some others it may take a day or two for the update to take effect. Some may even have a special procedure to 'switch on' your site. If you are having problems viewing your web page on the Internet check with your ISP to see if there is some special procedure you need to undertake. But that's it, once that is done, you and the rest of the world will be able to view your web site.

Back to Beginning of page





Maintaining it thereafter

Once you have got your web site live and working properly, you will then have to maintain it. This could be updating the information contained on it or simply improving the site as your HTML skills improve.

Whatever the reason for updates, we would recommend you make changes first to your local site. Treat it as your 'test bed' so that you can always try and avoid putting things on your web site that do not work (it happens to us all).

Another important reason to do this is version control. If you have a local site but make changes to your web site directly, then the two will necessarily be out of sync. The next time you make a change by uploading your site again it is all to easy to forget to make that change locally first so you will be putting back some old HTML.

With Terrapin FTP Browser you also do not have to upload everything all the time. Obviously you can simply drag the new or updated files directly to the relevant folders, but one useful option within directory drag drop is to only transfer files which are newer.

Once you have performed the directory drag drop a confirm dialog will appear, on which you will see a button which says options. By clicking this a series of options will be available.

You can immediately see the option to 'Upload files only if newer', but if the first 5 options are selected together Terrapin FTP Browser will then perform a complete reconciliation of your local and remote files. In other words, it will make your remote web site exactly the same as your local one.

It can save a lot of time wading through large sites and manually deleting things you no longer need or only uploading files which have changed. It also removes any margin for error, it is all to easy to delete something you need or forget to upload something that has changed. It really can prove to be a godsend.

Back to Beginning of page

Copyright © 1996-1998 Terrapin Internet Ltd. All rights reserved.
All product names mentioned are acknowledged to be the trade marks of their producing companies.