Subject: Content-Encoding: gzip AND Content-Type: application/x-javascript

From: Joseph Link <[email-masked]>
Date: Wed, 06 Sep 2000 23:39:54 -0500

Hello all...

I have run into a problem with Netscape 4.x and some earlier versions of IE...

The following is the server info being generated by me

telnet www1 8050
Trying 208............
Connected to www1.......
Escape character is '^]'.
GET /...... HTTP/1.0
Accept-Encoding: gzip

HTTP/1.1 200 OK
Date: Thu, 07 Sep 2000 03:09:40 GMT
Server: Apache/1.3.12 (Unix) PHP/4.0.2 mod_ssl/2.6.4 OpenSSL/0.9.5a
X-Powered-By: PHP/4.0.2
Expires: Fri, 08 Sep 2000 03:09:43 GMT
Content-Encoding: gzip
Connection: close
Content-Type: application/x-javascript

When I use Netscape to retrieve this same file, I get errors about 
unrecognized characters in javascript... it isnt decoding the gzip and the 
js interpreter is decoding binary.

However, if I remove the Content-Type: application/x-javascript header, 
netscape does decode the gzip and display the file.  In order for me to use 
this as a SRCed js file I NEED the Content-Type: application/x-javascript 
header.

Is there a header that is missing?? Does anyone know a workaround?? 
Essentially, i need to be able to send a gzip encoded javascript file and 
have it interpretted.. This does work fine with IE 5. Is it just another 
example of NS 4 blatant disregard for standards?? Or am I reading the 
standard wrong and encodings of types other than html are not allowed?

Thank you
Joe

*******************************************************************

FYI.... Please begin using my new email address
	[email-masked]

[email-masked] will be phased out by Jan 1st 2001

Thank you

*******************************************************************

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 6 Sep 2000 22:11:12 -0700

Sounds like a bug in NS.

I wouldn't say that IE is any better or worse; IIRC IE advertises that it
can do deflate, but doesn't support it correctly (if anyone can demonstrate
that it can, pls tell me - I'd love to get it to work).

Cheers,

-- 
Mark Nottingham
http://www.mnot.net/

---

From: John Stracke <[email-masked]>
Date: Thu, 07 Sep 2000 10:02:10 -0400

Joseph Link wrote:

> have it interpretted..

I can think of a workaround on the client side, but it needs Java: use some
uncompressed JavaScript that calls into Java to fetch the compressed file, then
uses eval() to execute it.

--
/==============================================================\
|John Stracke    | http://www.ecal.com |My opinions are my own.|
|Chief Scientist |=============================================|
|eCal Corp.      |Never mind the GUIs--Unix won't be for the   |
[email-masked]|masses until we fix backspace & delete.      |
\==============================================================/