JavaScript considered harmful (was Re: New online index to Be azley's tutorials)

Steve Holden sholden at holdenweb.com
Tue Jan 8 22:46:38 EST 2002


"Skip Montanaro" <skip at pobox.com> wrote in message
news:mailman.1010542632.12583.python-list at python.org...
>
>     >> Did you consider using Content-Encoding: gzip and compress the data
>     >> on-the-fly? Usually works very well.
>
>     Tim> IIS 4.0 :(
>
>     Tim> If *anyone* knows how to do it with IIS 4.0 (I've done extensive
>     Tim> searches online) please let me know for future reference.
>
> I know nothing about Windows, but that's never stopped me before. ;-)
>
> Can't you add
>
>     <meta http-equiv="Content-Encoding" content="gzip">
>
> to your document's <head> and then gzip the body?  Won't that sneak
through
> IIS without corruption?

Not without using special methods to force IIS to treat the content as
binary. IIS is pretty picky about stuff like that! But I seem to remember
having to do something similar to get graphical content out through IIS from
a Python script (I should have used CGI rather than ASP, but that's another
story). The thing you NEED to know about is the BinaryWrite method of the
Response object.

Knowing what to search for does help, and with the advantage of having
previously done something similar (and despite Google being down) I soon
found

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q193998

which should give you enough detail to get it going.

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list