Published on: Friday 25th September 1998 By: Martin Webb
The following is based on the discussion here at irt.org amongst the team following this question received from one of our visitors:
I agree with you. However, not everyone has access to the CGI-BIN directory.
Take for instance my IAP (http://www.btinternet.com/). For £10 per month (its a UK IAP), you get 10Mb of web space, access to three pre written scripts: Guestbook, Counter, Form to Email and lots of helpful support via phone, email and newsgroups. You don't get any access to the CGI-BIN. Now this sort of setup suits most people. In fact for btinternet over 150,000 people have just that. For this sort of deal most people are hand held through everything to do with the web.
Now with the new domain http://www.irt.org/ this is on a web host provider in the USA. Totally different approach, everything available, including full access to the CGI-BIN. However almost non existent support. This would frighten off every single newbie to the internet.
Then again, why have all of the processing done on the server? Everytime you want to include a SSI, or run a CGI script, the performance of the server is affected. Why not get the client machine to validate your forms *before* they are submitted to the server? Why not use Client Side image maps? Why not use simple redirect scripts on the client? Its quicker, quicker and quicker.
Then again not everyone has a browser that supports a client side scripting language, or even when they do, not all have it enabled. This is where skill comes into developing web pages.
The two technologies compliment each other. The thing to go for is a solution which gives a visitor a memorable experience so that he comes back, while making sure that the site degrades gracefully for visitors who don't have the capacity (or don't want to) to view your site the way it is intended.
With a browser like Opera (in which a user can turn off just about everything), what is a developer to do? Do we disable everything? Do we provide a myriad of alternatives? Do we force the visitor to do it "our way"? Good questions, all of them.
What is required is a combination between pre server side processing to establish which browser is being used, and then outputting the relavent code, and then client side processing dependant on what we downloaded to the client.
The only problem I can see with this approach is that the server has to pre-process all the documents before delivering them. If we did go down this road, then I've loads of thoughts on how we improve the site: database of articles, each presented slightly differently depending on for example, the age of the article, status of the article, browser etc. Intelligent creation of navigation text links, dependent on where you are in the site and at what level (this would do away with the need to maunally edit every file each time you want to change the content of the navigation links). Other things like banners/adverts/counters, standard headers/footers, copyright messages. Server Side Includes, last modifed dates etc.
I suppose one question to ask is *how* much of a performance issue is parsing each file before replying to the client?
The last question you raise (processing time) is very relevant, but in both ASP and CFML (I'm not sure as to CGI), you're able to publish all dynamic content at a given time, e.g. you could make the server process all links every night and then it publishes them to static pages, which are then updated the next day, when the server repeats this task.
I'm not sure about ASP or CFML, but CGI is effectively free. You can install the Linux operating system, followed by the Apache web server and voila'.
In this age of version 4 browsers, which support client side scripting, images, frames, 1600x1200 resoluton monitors, and all manner of things, its an educational experience to view your web site on a simple text browser like Lynx.
Or do more users disable it than I realize?
I went to http://www.cnn.com/ the other day. It is a graphics intensive site and has a graphical navigation bar - a sort of 'where am I' (Image map). Every time I clicked on this image map, the complete page refreshed INCLUDING the image - downloading a new gif while I waited.
Imagine the server hit when the complete page is regenerated each time one visits. Then imagine this only happening when the browser is Lynx or mosaic.
I think the keywords here are percieved speed, server hits and degrading gracefully.
This form allows the user to click the submit button to send an email to the dubious email address firstname.lastname@example.org:
<FORM ACTION="mailto:email@example.com" NAME="myForm"> <INPUT TYPE="SUBMIT" VALUE="Form Submit" NAME="myButton"> </FORM>
There'll not be a warning message, they'll not be a failure message, it'll just fail quietly. However the following will submit the form:
But as Netscape and Microsoft set the warnings on by default then this shouldn't happen.
Perhaps this article should have been called: "Images - why bother?". Maybe next time.