How does the javascript engine understand compressed JS scripts?

usually, if the plaintext is compressed, there should be a decompression procedure. How does the js engine interpret compressed, compressed js scripts?

Does the js engine have built-in demining algorithms?

+3
source share
4 answers

First, you need to understand that there is a difference between minimization and compression.

1. Minimization does not compress

- JavaScript , , .. . , , .

2.

, , gzip, , . . .

3. .

, , , , , . , jQuery 200 , , , ~ 30 .

+4

, javascript, .

+6

javascript - javascript. long .

+2

JavaScript - , (, var foobar = 2 var a = 2;)

GZipped JavaScript ( ) , .

The browser will identify the server so that it can access the compressed content with a header similar to

Accept-Encoding: gzip, deflate

+1
source

All Articles