Beim Server sollte eigentlich schon ein Mime-Type eingetragen sein. Schlimm ist nur, dass in diesem Fall auch wieder mal zwei Varianten kursieren, die Du ja genannt hast: application/x-javascript und text/javascript. Ich weiss nicht, wo die Verwirrung herkommt, anfangs hiess es immer nur text/javascript (Opa erinnert sich <g>) und irgendwann hat dann jemand (Netscape vermutlich) application/x-javascript ins Spiel gebracht. Vielleicht sollte man im Server einfach beides eintragen.
Hm, ich kenne eigentlich nur application/x-javascript
Netscape sagt dazu in der Doku zu Javascript1.1 (kam mit dem Navigator 3, der erstmalig JavaScript Source in externem File zuliess):
"External JavaScript files should have the file name suffix .js, and the server must
map the .js suffix to the MIME type "application/x-javascript", which the server sends
back in the HTTP header. To map the suffix to the MIME type, add the following line to
the mime.types file in the server's config directory, and then restart the server.
type=application/x-javascript exts=js
If the server does not map the .js filename suffix to "application/x-javascript" MIME type,
Navigator will not load the JavaScript file specified by the SRC attribute properly.
Note
This requirement does not apply if you are using local files. "
Schließlich war ich stinkesauer auf die halbe Welt und hab alle MIME-Typen für externe JavaScripts rausgenommen und siehe da... es funktionierte plötzlich.
Eigenartig.
Meine bisherigen Erfahrungen decken sich naemlich mit der Doku.
Ohne MIME-Typ (Server) wird Quelltext angezeigt.
Das ist damals auch bei meinen eigenen Seiten passiert. Nachdem auf meine Bitte hin
MIME-Typ eingetragen war, klappte es. Ich glaube, das war damals Apache.
Ist eigentlich bei allen so. :-)
Nein (s.o.), alle, von denen ich weiss, dass anfangs Probleme auftraten, waren mit MIME-Typ dann gluecklich und zufrieden.
Christine