Create and download zip file with AJAX

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
User avatar
Otto
Posts: 6403
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 21 times
Been thanked: 2 times
Contact:

Create and download zip file with AJAX

Post by Otto »

Dear Antonio,
How can I compress response json in ajax call.
I think this should be possible with mod harbor.
But then is if sufficient to simply use content-encoding: gzip.
Maybe you have an example.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Carles
Posts: 1149
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona
Been thanked: 7 times
Contact:

Re: Create and download zip file with AJAX

Post by Carles »

Otto,

This work is done by Apache transparently. You must activate the mod_deflate in your httpd.conf

To see if your site works there are pages that will help you verify it, such as https://www.giftofspeed.com/gzip-test/

C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Otto
Posts: 6403
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 21 times
Been thanked: 2 times
Contact:

Re: Create and download zip file with AJAX

Post by Otto »

Hello Carles,
thank you so much.
On my server I had to use this test tool:

https://www.whatsmyip.org/http-compression-test

https://www.giftofspeed.com/gzip-test/ give me an error.
On an other serve this is working fine.


Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6403
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 21 times
Been thanked: 2 times
Contact:

Re: Create and download zip file with AJAX

Post by Otto »

Hello Carles,
I made a test with deflate on and off.

Image

Thank you again for your help.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Post Reply