Rev cgi & gzip HTML data to browser

jbv jbv.silences at club-internet.fr
Sun Aug 20 05:54:54 EDT 2006



Mark,

Thanks for your reply.

Here's the code that I'm actually using :

get compress(myHTML)
put "Content-Type: application/octet-stream" & cr & "Content-Encoding: gzip" & cr &
"Content-Length : " & number of chars of it & cr & cr
put it

Best,
JB

> HiJB,
>
> It is not clear to me whether you are trying to display data in a
> browser or want to download a file to disk. In any case, make sure
> that the first line returned by the cgi contains the correct mime
> type for the .gz extension:
>
> put "Content-Type: application/octet-stream" & cr & cr
>
> It is possible that the browser slows down because it needs to find
> out what type of data it is downloading. Providing the correct mime
> type may help.
>
> Best,
>
> Mark
>
> --




More information about the use-livecode mailing list