25

Something I've noticed over the past few weeks is how many big commercial websites use jQuery combined with lots of plugins - but don't admit it. They will rename the main library to something obscure, as well as the plugins. Quite a few will even remove the comments that contain the MIT/GPL license information. (just noticed today that odeon.co.uk have done exactly this)

Why are they doing this? are they abashed by the face that they are using a free and open source library?

Robert Harvey
  • 200,592

9 Answers9

26

Well, its the same for some projects i work on, but only because of the automated minfying Process that is part of every release.

Hannes
  • 331
  • 5
  • 11
13

Under the definition of the MIT license, it is perfectly permissible. They are not distributing it, and even if they were, they would only have to include a copy of the license file (not required to be the header of each file).

Dekker500
  • 131
6

Aside from the other answers, which are good guesses, the only other reason I could think to deliberately obfuscate which libraries you're using might be to minimize the impact if a remote exploit is discovered in the library.

If there was some big showstopper of a XSS hole discovered in jQuery, for instance, it might be of some benefit to have my use of it not be super obvious.

I agree with the other answerers who say it's probably a side-effect of deployment autominification.

Dan Ray
  • 9,116
  • 3
  • 38
  • 49
4

This may be done for optimization. An end-user needs not to receive that comments. Even if they save 1kb of code by this, it may be good

simon
  • 141
3

Probably a misguided attempt at obfuscation, or another (arguably) misguided attempt to reduce bandwidth. I can't think of any practical or technical reason they would want to do this.

If you are curious, try emailing them asking why they removed the license information from the code.

Tom
  • 681
2

They may be using a local modified version, and have then renamed it to follow local standards parhaps?

JohnB
  • 1,252
2

We rename ours because we provide drop-in widgets for our customers and they might be also using a different version of jquery that's incompatible with ours.

$ could be any version of jQuery (or sometimes other libraries like prototype), but dmJQuery is always the one we support.

(We don't really rename it in the source, just do this...)

/* make sure we use this version of jQuery and not any others. */
window.dmJQuery = jQuery.noConflict(true);
1

As shown on the offical jQuery website, it's used by: Google, Dell, Digg, NBC, Netflix, Mozilla, WordPress and others.

It's a widely regarded and used library.

So I assume they change the name so that people don't know they use jQuery, as they'd view it negatively, because they are relying on someone else's code rather than having written it themselves.

1

Large website developers care about their users, I don't see any reason why they would go out of there way to obfuscate the technologies they use from the infinitesimal fraction of their users which are readying the source code of a page.