Is it bad to Base62 encode a javascript file?

后端 未结 2 398
清酒与你
清酒与你 2020-12-28 16:13

I just found Dean Edwards javascript packer here: http://dean.edwards.name/packer/

It has a couple of options,

  1. Base62 encode
  2. Shrink variable
2条回答
  •  既然无缘
    2020-12-28 17:12

    Base 62 is nothing but a positional notation. That is, it can be used to represent very long normal text by a very shorter version.

    Using Base62 adds an extra step before the js can be put to use by clients. For jQuery kind of library this step may take an extra 100ms to 500ms of time on clients, depending on many factors.

    Now we can compare the reduction in time to download the script to extra time taken to execute the script. It may reduce download time by 50ms but takes an extra 100ms to process it. Diminishing returns!!

提交回复
热议问题