[Javascript] JavaScritpt simple compression code

Kim Hoogenberg kim.hoogenberg at virgil.nl
Fri Feb 18 03:40:36 CST 2005


If you're using Apache, you can configure a virtual host to communicate 
over http using the zip (server -> client and vise versa) algorithm. You 
will loose some performance here, but traffic will also be reduced a lot.

>Hi all.
>
>I'm doing lot of work with *big* string variables. 
>
>I know it can seems comfusing, but I need a JavaScript code for
>compressing the plain text inside this variables.
>
>Let me explain a little more my problem.
>
>Imagine a javascript code that use Microsoft.XMLHttp to query an ASP
>script. Something like:
>
>function fSend( part , text )
>{
>var http = new ActiveXObject( "Microsoft.XMLHttp" );
>http.open( "GET" , "http://www.mydomain.com/foo.asp?part=" + part +
>"&text=" + text, 0 );	http.setRequestHeader( "Content-Type" ,
>"application/x-www-form-urlencoded" );
>http.send( );
>};
>
>By this way, I can send information from JavaScript to an ASP page and
>then store it into the data base.
>
>The problem is that the text to send is very big (much more than a
>valid url length), so I need to split it and perform multiple fSend( x
>, x ).
>
>I cannot change this way of doing things, this works fine and I'm not allowed. 
>
>But I was wondering... If I can compress source text, then send it,
>and then uncompress on the ASP, I can save many http communication.
>
>
>Any help ? Thanks
>
>Eligio Morgado.
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>  
>




More information about the Javascript mailing list