[thelist] Client Code versus Server Code Article....

Liz Lawson lizlawson at charitycards.co.uk
Tue Aug 8 06:19:57 CDT 2000

>I come from a networking background were I believe the Client versus Server
>outlook is just part of the basic knowledge base. But a designer or HTML
>jockey doesn't usually start with that understanding. What helped you to
>understand the differences between client side coding and server side

For me (from an Art&design background), just understanding what order the
processes happen made it pretty clear...

browser requests page >>
webserver checks page, realises it needs serverside processing >>
cgi / php  / whatever processes page and outputs resulting HTML >>
webserver serves output to browser >>
browser gets page >>
javascript happens

If I had to explain it to myself two years ago, I would try someting like

Serverside processing takes some instructions and outputs a page of plain
old HTML / javascript to the server, which is sent to the browser in the
normal way. By the time it's served, the page is no different to a
hand-coded static page that happens to have the appropriate values in it.

This means that all the stuff that serverside scripting can do as well as
output HTML pages, from database manipulation to emails to generating
graphics, happens before the webserver serves the page. By the time the
server gets the page, the script has
finished and stopped. The serverside part of the chain can't react to
anything which happens after the page is served.

That means browser / display detection, form input or information like that
which you want to process serverside has to be sent back to the server from
the browser. This new page request launches a NEW instance of the serverside
script. It's not the same script waiting for some input. Serverside
processing of client input can't make a page change while it is on the
client computer. (And so is pretty useless for processing mouse events!)

Clientside scripting is the exact inverse. It can be executed only after the
page has been served to the client, can react only to what happens at the
client machine, and has access only to information in the client's browser.
It can't interface with a database or any files on the server. If it will
need some information from the server, that information has to be coded into
the page itself before it is served.
The clientside code can't interact in realtime with any information on the

It's probably technically very innacurate, but it's a good mental starting


More information about the thelist mailing list