Hello,
I have to retrieve json datas from a server. It works fine. The only problem I have, is that I have to retrieve a lot of records to fill my table and it produce a quite huge json file. Is there a way to compress the json in server side (PHP) and decompress it on the mobile before opening it ? and how ?
Regards
3 Answers
Do you really have to load all the data in one shot? There is only so much your phone will show in one screen without scrolling. Maybe you should load it progressively, depending of the scroll position.
Thanks Luc for your reply. the problem is that if the user want to use the search bar and and all datas are not loaded...
well I have fond this module : https://github.com/TermiT/ZipFile
and using gzcompress on the php server side reduce the json output fron 115kb to 15 kb.
will have to try the module now. also will try to minimize field name in the json output like in your link.
Your Answer
Think you can help? Login to answer this question!