Previous: Running "Local" Web servers Contents and Introduction

Recommendations

For ease of management and maintenance we strongly recommend to follow a set of rules. These rules are not necessarily of any significance for the normal user browsing the web pages. But, an easier management and maintenance will lead to less errors, which in the end will benefit the user.
These recommendations are nothing but recommendations, but we believe that these rules will in the end benefit all of us: users, developers, and the web team.

keep it simple

(source: WebTechniques April 1999 (p40-45) )

dynamic contents vs. static contents

Look at it any way you may, a HTML page will always be served faster than the same HTML information generated through a programmed interface. This is especially true for pages that are requested frequently.
We strongly recommend to only use dynamic procedures to serve information that is really dynamic. A HTML page that changes once a day cannot be considered dynamic information.

lowercase filenames

The DI-DC web services run on UNIX servers. File names are consistently case sensitive on UNIX systems, unlike on some proprietary systems. Creating hyper links with UPPERcase or mixed case might create problems when the pages are transferred from a Windows system to the web server. We strongly recommend to use only lowercase in file names and hyper links. Even when generating data on a UNIX system, because this data might later be maintained from a Windows system.

Application.cfm is an important exception. This file is the base of every ColdFusion application, and this file name is most definitely case sensitive.

index.html

Each subject should have a file called "index.html" as the first entry point into it. This allows a user to return to the entry page of a document by simply truncating the URL. Or, the user can access a document using a shorter, truncated, URL. It also makes the entry point to the document visible for the maintainer of the data.
For example, the web server will respond to the URL "http://www.cc.cec/subject/" with the data in file "/intracomm/public/htdocs/subject/index.html". If there would not be an "index.html" file in that sub directory, then the user would receive a page listing all files in the sub directory.
As stated in the chapter on configuration related issues, other file names can be used instead of "index.html".

"incomplete" URLs

"Incomplete" URLs pointing to directories instead of to files should have an "ending slash" (e.g. "/Publishing/" instead of "/Publishing"). Upon reception of an "incomplete" URL without "ending slash" the web server will respond with a "re-direct", telling the browser to request the URL with the "ending slash". In other words, an "incomplete" URL will trigger an extra request to the server causing longer response times for the end user.

use relative URLs

Relative URLs should be used: do not include "http://www.cc.cec/" and the likes in the URLs.

links to other web servers

When adding links to other web servers, make sure the address exists. A local server might have been defined in the 'hosts' files of the local PCs but not in every single PC in the Commission.
Use the host name as it is known by DNS or the IP address. For example, "www.cc.cec" is the host name of the IntraComm server as it is known by DNS. Actually, this is a bad example, because you shouldn't specify this host name in pages on IntraComm (see preceding recommendation).

image maps

The image maps are defined following the NCSA style. Client side image maps are preferred to server side images maps, because the use of server side image maps involves an extra HTTP re-direct request each time.
The client side method, however, is not accepted by all browsers. For example, Netscape Navigator version 1.22 (old Commission standard) does not understand client side image maps. For those browsers, and for visitors that choose not to download graphics, we suggest to always include corresponding text hyper links.

the trouble with Word files

Do not use Word files unless you really have to. The trouble with Word files, apart from the ever-changing file format, is the possible presence of macro's. These macro's are an invitation to introduce viruses. We frequently receive messages from alarmed users about "infected" Word files.

recommendations for "local" servers

The same rules may be applied for "local" web pages. In that case the root directory for web pages to be published through the dissemination web server would be:
/intracomm/local_sites/htdocs/DGXY/subject/

The URL "http://www.cc.cec/DGXY/subject/" would be translated to file "/intracomm/local_sites/htdocs/DGXY/subject/index.html".
We propose to write the DG name in uppercase (e.g. "DGXY") in the URLs for "local" data, and in lowercase (e.g. "dgXY") in URLs pointing to public data.

Data Centre