0

I'm using the Grunt plugins to concat, minify and generate source maps of my Javascript before I push it to the production server (I'll soon be doing the same with SASS for CSS).

The source maps generated are plain text but with an file 'extension' of .map (e.g. plugins.js.map). Apparently, they aren't being gzipped.

I'm on shared hosting so limited to .htaccess and I assume this is as simple as adding .map to what seems to be a list of MIME-types in my existing .htaccess.

For reference, I'm using the code in this question (which is taken verbatim from the HTML5 Bolierplate repo).

Everything else is being served with gzip, the source maps are the only things which are not.

What do I need to do to ensure that my source maps are also served with compression?

adam-asdf
  • 191
  • 1
  • 11
  • I don't have enough reputation to create a new tag, but I tried to create `source-maps` as a tag to make it easier for others to find this question. I know source maps are fairly new and front-end related but I suspect others will have the same question. If appropriate, could someone with adequate reputation add that tag? – adam-asdf Dec 26 '13 at 03:21
  • Out of curiosity, why bother? They're not going to get downloaded by anyone who isn't using the inspectors. – ceejayoz Dec 26 '13 at 04:20
  • I wasn't sure if that was the case. Both PageSpeed and YSlow browser extensions were giving me messages about it improving performance, it made me wonder if it loaded for all users. – adam-asdf Dec 26 '13 at 06:26

0 Answers0