SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Taking file1.js and file2.js and combined them together to make file3.js


Using things like JsMin or YUICompressor


URL has /scripts/file2.js?v=123456

share|improve this question

I use the JavaScript Compressorator. See my blog post which explains why I like it.

EDIT: I work primarily in SharePoint Designer, so my methods may not match yours. I'm more likely to do this to add my scripts to pages, whether the master page, page layouts, or individual aspx pages.

Yes, I would always use the minified versions in a "production" environment (where I didn't want to do any debugging).

The ?v= thing is sometimes required if you have overzealous caching going on in your environment. If you use unique names for your script files, then it's probably not necessary.

share|improve this answer
There are lots of compressors out there. Just wondering what technique you use to include it in SharePoint solutions. Do you manually include the min versions or do you have it going as a build action? – Shane Aug 23 '11 at 0:57
Shane: I added some edits above to explain my approaches more fully. – Marc D Anderson Aug 24 '11 at 13:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.