Compress XML file using javascript?

I found a DIY card .. a great card tool if you ever look for it. Besides how fantastic it is ... the associated XML file can become quite large (it contains map settings, country names, etc.). I was wondering if it is possible to compress it, and javascript to unpack it from the users ....

There are many repetitions, there are many tags that I thought could be replaced by place owners and then replaced with javascript ...

or am I just relying on gzip to do this for me?

+3
source share
4 answers

JS is very slow. Gzip is definitely the way to go.

+1
source

HTTP - .

javascript;

+1

, . , , ( , ) .

0

GZip Compression - , , .

JavaScript - , , XML .

This extra code will also add the possibility of additional errors in your application if the search and replace match things you don't expect. Therefore, it is recommended that you do not add additional engineering effort until you are sure that it is necessary.

0
source

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


All Articles