html /css horizontal drop-down menu question

A

Andy Dingley

.jsp files are Java Server Page files that are parsed by the server.

..jsp files are files with a .jsp extension that _may_ be treated by
the server as JSP pages - or they may not (and for much hosting, they
will probably be ignored)

So renaming a .js file to .jsp _probably_ won't change anything -
it'll still get returned to the browser and executed as JavaScript.

But I don't know of any browser where the "disable client-side
scripting" option is so incredibly flakey that it relies on the
apparent file extension. So the suggestion is indeed rubbish.
 
D

David Dorward

Andy said:
So renaming a .js file to .jsp _probably_ won't change anything -
it'll still get returned to the browser and executed as JavaScript.

Unlikely. If the server isn't set up for JSP, then it will probably return
the unknown file as application/octet-stream - and the browser will ask the
user where they want to save it.
 
A

Andy Dingley

It was somewhere outside Barstow when David Dorward
Unlikely. If the server isn't set up for JSP, then it will probably return
the unknown file as application/octet-stream

If that's how the server's configured. But a lot of them (especially
in cheap hosting) throw unknown types back as text/plain
 
D

David Dorward

If that's how the server's configured. But a lot of them (especially
in cheap hosting) throw unknown types back as text/plain

And the browser still won't try to treat is as JavaScript (unless its an
older version of IE <sigh>).
 
T

the idiot

David Dorward said:
And the browser still won't try to treat is as JavaScript (unless its an
older version of IE <sigh>).

do you think he was trying to trick me - knowing (or assuming correctly) my
ignorance on such matters?
 
A

Andy Dingley

It was somewhere outside Barstow when David Dorward
And the browser still won't try to treat is as JavaScript (unless its an
older version of IE <sigh>).

Do you have any references for acceptable content types on scripts
under different browsers ? I've still got (intranet) code running
from around '97 that's serving them as text/plain and AFAIK it's still
running happily.
 
D

David Dorward

Andy said:
It was somewhere outside Barstow when David Dorward


Do you have any references for acceptable content types on scripts
under different browsers ? I've still got (intranet) code running
from around '97 that's serving them as text/plain and AFAIK it's still
running happily.

Oh drat. Brain not working properly. I was thinking of an HTML document with
JS in a <script> element (probably since JSP is an HTML document with JSP
in <% %> pseudo-elements).
 
D

David Dorward

the said:
do you think he was trying to trick me - knowing (or assuming correctly)
my ignorance on such matters?

I wouldn't like to guess at other people's intentions, but to there is a
reason that the Hanlon quote has become a cliche so I'll quote it and let
you come to your own conclusions.

"Never attribute to malice that which is adequately explained by stupidity."
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top