I am sending a whole lot of JSON information to jQuery (around 40KB), which could be a lot smaller if the descriptors weren't repeated for every single object. (e.g. 'name': , 'title': 'image': ...)
Usually I send JSON data like this:
reply = json.dumps({'items':itemsArray})
return HttpResponse(reply, 'mimetype/javascript')
Is there a way in which I can either gzip this for the client (if available), or use a third party utility to translate between shortened versions of object attribute names between server and client side, using the jQuery map()
function?