Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Minified VS. Packed Javascript?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43184
    Rugg
    Participant

    Hello,

    I’ve done a few google searches regarding minified and packed javascript files…but I’ve yet to find a clear answer/explanation defining the key differences between the two. Aside from the file size and appearance of the markup, can someone please clarify the differences?

    Thank You

    #127154
    Merri
    Participant

    Minifying and packing for the most part refer to the exact same thing: reducing amount of syntax to provide the shortest code possible. I guess packing was the term early on before minifying catched up as a better term, and I guess (early) packers didn’t always do good job with code performance. Modern tools should be quite safe to use.

    *Compression* is a different thing though. It refers to serving the JavaScript files as a GZIP compressed stream. This is transparent between server and client: web server can be set to do the compression on-the-fly while browser automatically uncompresses when it receives compressed data.

    Thus you can get minimal transfer by first minifying a JavaScript file and then serving it compressed. And yes, the end result is often smaller than when only compressing with GZIP.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.