JScrewIt (different solutions: 16117, 14747, and 5903 characters)
In case of lipogrammatic code like JSFuck - which largely relies on hacks to encode things as short as possible - incompatibilities are even larger.
For example, the code generated by JSFuck for
alert("Hello World!") does not run on Internet Explorer.
If this is an acceptable limitation, we can still drop the size down to 16117
22174 characters (I cannot include the whole code directly because answer size is limited to 30000 characters):
A code that works on Internet Explorer too, but not so on some older browsers, takes 14747 characters to encode:
Finally, if it's ok to have code that runs on current Firefox [update] and Safari [end update] only, we could do it with 5903
I encoded all of those with JScrewIt.
You can find other encoders similar to JSFuck listed on Esolang: http://esolangs.org/wiki/JSFuck.
I tried all of them and I have to say JScrewIt seems to be the best one (and also the only one that works in all browsers), though I havent't analysed how it works in detail.
Another interesting encoder is 6chars.js, which generates larger output for short input like
alert("Hello World!"), but when the input gets longer it performs better than the other encoders because it encodes characters as numbers.
Numbers are shorter to write in JSFuck but require extra overhead to decode. Unfortunately, 6chars.js only works in Chrome and I can't say if it's being still actively developed.
It would be interesting to know if there are more of such encoders. If one could join methods used by different encoders in one tool it would be possible to produce even shorter solutions.