PDA

View Full Version : Is it possible to compress data that passes through Ajax requests?



Surgeon
15 Aug 2008, 5:47 AM
I know that it is possible to compress data using gzip library in PHP. It is very usefull when you need to compress javascript codes etc.
But I have another problem. When I load into Store data with 200 records it continues more than 20 secs. Is it possible to compress data that passes through Ajax requests?

evant
15 Aug 2008, 5:49 AM
Fairly sure you van gzip those, yes.

However, what is taking the most time? Sending the data or the server side processing.

20s is fairly excessive.

Surgeon
15 Aug 2008, 6:00 AM
Thanks for fast reply :)
20 secs it's the time, that shows me console in the firebug.
Can you give me some examples how to use compress in Ajax?

evant
15 Aug 2008, 6:09 AM
Depends on your server side language. Google it.

Surgeon
15 Aug 2008, 6:16 AM
Ok, I'll try, but if you can give some examples with PHP server-side language, it would be great!

evant
15 Aug 2008, 6:30 AM
http://www.google.com.au/search?client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial&channel=s&hl=en&q=php+gzip&meta=&btnG=Google+Search 8-|

devnull
15 Aug 2008, 7:19 AM
It depends more on the server software itself than anything else. most servers nowadays ship with gzipping of all content turned on by default. you should be able to verify this by looking at the headers in firebug.

vezuv34
15 Aug 2008, 8:04 AM
Thanks for this information

Surgeon
15 Aug 2008, 8:22 AM
Thanks for information, I will check tomorrow.