Javascript: why...? why...?

  • Thread starter Pascal Bouchard
  • Start date
P

Pascal Bouchard

Javascript is a language used on Web pages all over the Net.
I find Javascript usefull but... why most of the modern browsers allow its
users to disable it?
For what purpose was this language invented?
What is (are) the alternative(s)?
 
W

Wÿrm

Pascal Bouchard said:
Javascript is a language used on Web pages all over the Net.
I find Javascript usefull but... why most of the modern browsers allow its
users to disable it?

People do not like how javascript is abused to popup/under all kinda things,
resize windows and what not. Maybe because of that? ;)
 
K

Karl Core

Pascal Bouchard said:
Javascript is a language used on Web pages all over the Net.
I find Javascript usefull but... why most of the modern browsers allow its
users to disable it?
For what purpose was this language invented?
What is (are) the alternative(s)?

There are sooooooo many ways that websites can use JavaScript to abuse
visitors.
The book "Building Really Annoying Websites"
(http://www.amazon.com/exec/obidos/tg/detail/-/0764548743/103-3363179-5543861?v=glance)
Focuses on ways you can really piss people off.
A good 90%+ of the book focuses on JavaScript. That should answer your
first question rather well. People just abuse it too much.

JavaScript does have its uses. There are a lot of ways that you can provide
a high level of interactivity for your users with it.
I can't think of anything (useful) that JavaScript can do that can't be done
server-side such as with PHP, ASP, JSP, Perl, etc.

-Karl
 
J

Joel Shepherd

Karl Core said:
I can't think of anything (useful) that JavaScript can do that can't be done
server-side such as with PHP, ASP, JSP, Perl, etc.

True (I think, after three seconds consideration), but often the same
action performed client-side by JS seems faster (to the user) than
performing it server-side. Form validation is a good example: while one
would always want final validation to occur server-side, performing it
on the client-side may save the user from having to wait for a full page
request and load to discover they've made a minor typo or skipped a
field.
 
K

Karl Core

Joel Shepherd said:
True (I think, after three seconds consideration), but often the same
action performed client-side by JS seems faster (to the user) than
performing it server-side. Form validation is a good example: while one
would always want final validation to occur server-side, performing it
on the client-side may save the user from having to wait for a full page
request and load to discover they've made a minor typo or skipped a
field.

You're right. This is especially true for (very) high traffic websites.
You definitely don't want to burden the server with repeated requests just
to validate a form.
Still, in the case of form validation, it makes sense to do both client-side
and server side validation

-Karl
 
B

brucie

In alt.html Pascal Bouchard said:
Javascript is a language used on Web pages all over the Net.

and most of the time it shouldn't be. for example, needing JS so a
submit button works. people just don't think.
I find Javascript usefull

the technology isn't the problem, its giggly technology. as usual its
what people do with the giggly technology that is the problem
but... why most of the modern browsers allow its users to disable it?

or partially disable it. you're rarely wrong if you automatically assume
sites are going to do something annoying to you with it.
For what purpose was this language invented?

in hindsight - to annoy
What is (are) the alternative(s)?

use JS to add optional enhancements to a site, don't make it a
requirement for the site to work. easy peasy.
 
B

brucie

In alt.html Joel Shepherd said:
True (I think, after three seconds consideration), but often the same
action performed client-side by JS seems faster (to the user) than
performing it server-side. Form validation is a good example: while one
would always want final validation to occur server-side, performing it
on the client-side may save the user from having to wait for a full page
request and load to discover they've made a minor typo or skipped a
field.

Javascript form validation ¡V doing it right
http://www.xs4all.nl/~sbpoley/webmatters/formval.html
 
P

Pascal Bouchard

Dans un message précédent said:
use JS to add optional enhancements to a site, don't make it a
requirement for the site to work. easy peasy.

Absolutely right!
 
W

WebMaster

most people don't bother (or even don't know) to disable it...

This group IS a minority (yes, I know some people do not like to be reminded
of that) :)

Rudy
 
J

Joel Shepherd

WebMaster said:
most people don't bother (or even don't know) to disable it...

This group IS a minority (yes, I know some people do not like to be reminded
of that) :)

It might be a minority, but some of its members are very important ones.
Starting with search engine bots.
 
K

Kris

WebMaster said:
most people don't bother (or even don't know) to disable it...

All it takes is stepping up one security level in IE Settings, in plain
sight when you pop them open. With all the IE security holes buzz going
on, I assume people don't have a lot of trouble looking for and finding
those settings.
 
J

Jukka K. Korpela

Kris said:
All it takes is stepping up one security level in IE Settings, in
plain sight when you pop them open. With all the IE security holes
buzz going on, I assume people don't have a lot of trouble looking
for and finding those settings.

However, system managers and security staff may decide that's too
unreliable, and set up the company's firewall so that JavaScript is
filtered out before it even reaches the user's browser.

Moreover, e.g. updating Windows XP with Service Pack 2 (now happening
worldwide, you just can't avoid getting thrown at with the SP2 cd's
whether you have XP or not :)) has reportedly prevented JavaScript
execution in a large number of situations. Some of the patches make IE
treat certain kinds of JavaScript as security threat, therefore ignored.
No, you won't get a detailed description of the exact conditions where
this happens. (Such relative secrecy seems to be part of the security
policy.)
 
S

Sam Hughes

True (I think, after three seconds consideration), but often the same
action performed client-side by JS seems faster (to the user) than
performing it server-side. Form validation is a good example: while
one would always want final validation to occur server-side,
performing it on the client-side may save the user from having to wait
for a full page request and load to discover they've made a minor typo
or skipped a field.

It would have been neat if HTML had built-in form validation, in the form
of some sort of regular expression containing attribute.
 
N

Neal

It would have been neat if HTML had built-in form validation, in the form
of some sort of regular expression containing attribute.

Then again, it's a Markup Language.
 
T

Toby Inkster

Sam said:
It would have been neat if HTML had built-in form validation, in the form
of some sort of regular expression containing attribute.

I think XForms 1.0 does have giggly validation stuff built in.

XForms is a general XML form markup language designed to be included as
part of other future standards, such as XHTML 2.0, future versions of SVG,
MathML, etc...

IIRC, the Mozilla team have started work on it, and there are various
browser plugins for XForms in varying stages of completion.
 
S

Sam Hughes

Then again, it's a Markup Language.

Then again, the attribute would be describing the (future) content of the
form field.

You capitalize Markup Language as if it were some kind of deity :p
 
N

Neredbojias

Without quill or qualm, Jukka K. Korpela quothed:
Moreover, e.g. updating Windows XP with Service Pack 2 (now happening
worldwide, you just can't avoid getting thrown at with the SP2 cd's
whether you have XP or not :)) has reportedly prevented JavaScript
execution in a large number of situations. Some of the patches make IE
treat certain kinds of JavaScript as security threat, therefore ignored.
No, you won't get a detailed description of the exact conditions where
this happens. (Such relative secrecy seems to be part of the security
policy.)

Wonderful. That makes IE is even more broken and less usable than
before. And Microsoft hires only people in the top 5% of their
graduating classes?? Glad I'm stupid.
 
N

Neal

Then again, the attribute would be describing the (future) content of the
form field.

You capitalize Markup Language as if it were some kind of deity :p

I did that to match HTML - HyperText Markup Language.

The point is, if it could think that well, it wouldn't be a markup
language anymore.
 
T

Thomas Mlynarczyk

Also sprach Sam Hughes:
You capitalize Markup Language as if it were some kind of deity :p

Maybe he thinks HTML stands for Holy Trinity's Markup Language.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top