Frage

Many websites, like Catch.com, depend on JavaScript heavily. Catch.com for example, when save the webpage, a javascript file: catchapp.js is downloaded, but it's content begins with strange codes, like:

function e(a) { throw a; } 
var i = void 0, j = !0, k = null, m = !1; 
function ba() { return function (a) { return a } } 
function ca() { return function () { } } 
function da(a) { return function (b) { this[a] = b } } 

So do they use some tools to change their js files before release?

War es hilfreich?

Lösung

They use JavaScript minification tools like jscompress. This will reduce the filesize, speed up the user's download and reduce bandwidth costs. It also works as code obfuscation.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top