|
Posted by David Dorward on 10/24/05 16:01
SmilingPolitely wrote:
> I have a couple of questions on the use of JavaScript
> in web pages, that I would like to open to the forum
> to discuss...
> What are the pros and cons when using JavaScript
> as a substitute for <include> for information
> contained on every page?
Pro. You can skimp on your server.
Con. User agents without JavaScript (such as GoogleBot, Lynx and
whatever browser came with my cellphone) won't get the data.
> if the browser is not JavaScript enabled
> and therefore unable to see my .js headers
> and footers, then how can I expect them to
> fill in a form that is validated using
> JavaScript?
You can't. You should only use JavaScript to make things more
convenient[1] (or perhaps more fun) for users. When it comes to
ensuring information is available, and sanity checking data the user
provides then you MUST do that on the server.
[1] "Oh, you didn't fill in an email address, the server's going to
reject this anyway so I'll save you the round trip" does qualify.
Navigation:
[Reply to this message]
|