C # Compression and JavaScript Decompression

I have a few lines that I need to compress server-side in C # and then unzip the client part in JavaScript. What can i use for this?

+3
source share
1 answer

Assuming you are retrieving this data through HTTP, is there any reason you cannot do this at the HTTP level? (See this article for information on HTTP compression .)

This way you do not need to do anything on the client side, except to make sure that the request contains the appropriate header Accept-Encoding. Depending on your server, you can simply configure some server settings to automatically get compression on this side ...

To be honest, it’s worth snatching WireShark to accurately check what happens up and down the wire. Perhaps you already got compression without knowing it :)

+7
source

Source: https://habr.com/ru/post/1712749/


All Articles