[Javascript] JavaScritpt simple compression code

Eligio Morgado eligio at gmail.com
Fri Feb 18 03:45:55 CST 2005


Kim, I use IIS.

I have been doing some tests, and the code performs up to 90 fSend( )
calls.It means that original text to send is 90 times bigger than max
url length.

So, if i can reduce, for example, 30% the original string, I will
*only* perform 67 calls. Process will continue being very slow but...




On Fri, 18 Feb 2005 10:40:36 +0100, Kim Hoogenberg
<kim.hoogenberg at virgil.nl> wrote:
> 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
> >
> >
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>



More information about the Javascript mailing list