You are here: Re: Webpages and JavaScript « HTML « IT news, forums, messages
Re: Webpages and JavaScript

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация