1

My server supports HTTP compression. Is there any advantage to compressing my JavaScript files? (not minifying them)

Update and clarification to what I mean:

Community
  • 1
  • 1
Dor Rotman
  • 1,511
  • 1
  • 15
  • 27

1 Answers1

1

Compressing your JS file will lead to, as Ian answered, smaller size and thus faster downloads. This is really a must-have for people coming from mobile devices or low-internet speeds(say at a free wifi spot, for instance).

  • 2
    There's always a tradeoff, between processing and transferring. Using `gzip`, the client has to unzip the contents and put it back together, taking some extra processing...so it's not the best idea to use if the client is lower on resources. But obviously, a slow network (in whatever way), compression is great so that there's less to transfer – Ian Jun 06 '13 at 14:29