Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.js files / ASP / Netscape 3

Posted on 1999-07-20
6
Medium Priority
?
270 Views
Last Modified: 2013-12-25
Is there any incompatibility between Netscape 3 and .js file (client-side javascript) ?
               
I use  ASP servers (a local Personal Web Server on Windows 98 and a remote IIS on Windows NT). No problem with PWS, bug with IIS, yet the file is only client-side javascript.

(According to  Netscape documentation, the following line to the mime.types file was added in the server's config directory,
            type=application/x-javascript          exts=js
)
No problem with IE4 and Netscape 4. What about IE3 ?

Thanks in advance.
0
Comment
Question by:sayasenh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:sayasenh
ID: 1864193
Edited text of question.
0
 
LVL 7

Expert Comment

by:nettrom
ID: 1864194
I've heard, and noticed myself, that Netscape 3 shows the content of the .js file.  from what I could find searching through comp.lang.javascript it's because the server doesn't respond with the right MIME-type (should be application/x-javascript as you mention).

have you checked that the content-type is sent correctly? (if possible, telnet to the server's port 80 and do a "HEAD /myfile.js HTTP/.10" followed by two CRs)

http://home.netscape.com/eng/mozilla/3.0/relnotes/windows-3.04Gold.html also says this:

"SRC attribute: The <SCRIPT> tag now has an additional attribute that allows a JavaScript file to be specified as the JavaScript source (rather than embedding the JavaScript in the HTML). Attributes within the SCRIPT tag can now be specified as follows:

<SCRIPT LANGUAGE=JavaScript SRC=mySource.js>

where mySource.js is the URL (relative or full address) of the JavaScript source code file.

The LANGUAGE attribute is mandatory unless the SRC attribute is present and specifies the scripting language. The SRC attribute is optional and, if given, specifies a URL that loads the text of a script. Both attributes may be present.

The SRC attribute specifies the scripting language by using the .js suffix. The suffix must be mapped by the web server to the MIME type "application/x-javascript" which the server sends back in the HTTP GET reply's Content-type: header. Without a properly configured server (one that maps .js filename suffix to application/x-javascript MIME), Netscape won't respond properly with the data coming back in the HTTP response to the SRC-initiated request."

apart from that I've seen in a comment to an earlier question that if you have a .js file included, and then call it from inside a table to write some content Netscape 3 messes up.  so instead you'll have to make it write the whole table.

apart from that I've not noticed anything.
0
 

Author Comment

by:sayasenh
ID: 1864195
Thank you, nettrom, for your interesting and detailed survey. The point isn't obvious !
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sayasenh
ID: 1864196
nettrom, could you answer the question, thus I can send you the points. Thank you for having kept the question open.

0
 
LVL 7

Accepted Solution

by:
nettrom earned 600 total points
ID: 1864197
no problem, thanks a lot.  I'll repeat my comment in the answer so it's easy to find later.


I've heard, and noticed myself, that Netscape 3 shows the content of the .js file.  from what I could find searching through comp.lang.javascript it's because the server doesn't respond with the right MIME-type (should be application/x-javascript as you mention).

have you checked that the content-type is sent correctly? (if possible, telnet to the server's port 80 and do a "HEAD /myfile.js HTTP/.10" followed by two CRs)

http://home.netscape.com/eng/mozilla/3.0/relnotes/windows-3.04Gold.html also says this:

"SRC attribute: The <SCRIPT> tag now has an additional attribute that allows a JavaScript file to be specified as the JavaScript source (rather than embedding the JavaScript in the HTML). Attributes within the SCRIPT tag can now be specified as follows:

<SCRIPT LANGUAGE=JavaScript SRC=mySource.js>

where mySource.js is the URL (relative or full address) of the JavaScript source code file.

The LANGUAGE attribute is mandatory unless the SRC attribute is present and specifies the scripting language. The SRC attribute is optional and, if given, specifies a URL that loads the text of a script. Both attributes may be present.

The SRC attribute specifies the scripting language by using the .js suffix. The suffix must be mapped by the web server to the MIME type "application/x-javascript" which the server sends back in the HTTP GET reply's Content-type: header. Without a properly configured server (one that maps .js filename suffix to application/x-javascript MIME), Netscape won't respond properly with the data coming back in the HTTP response to the SRC-initiated request."

apart from that I've seen in a comment to an earlier question that if you have a .js file included, and then call it from inside a table to write some content Netscape 3 messes up.  so instead you'll have to make it write the whole table.
0
 

Author Comment

by:sayasenh
ID: 1864198
Adjusted points to 150
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question