Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jan 7 '11 at 13:55

This question came from our site for professional and enthusiast programmers.

closed as not a real question by ChrisF Mar 31 '11 at 13:40

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

9  
Interesting question. Removing the copyright comments is infringing the license agreement, isn't it? –  Pekka 웃 Jan 7 '11 at 13:55
2  
Why was this moved here? –  Tom Jan 7 '11 at 13:57
7  
@Tim Post: I would say it's fully on-topic for programmers, not at all for stackoverflow. So correct decision there. –  Orbling Jan 7 '11 at 14:04
3  
@marcgg: it's certainly not a programming question. Personally I voted to close as argumentative, but then again programmers.se pretty much exists to take in all those "subjective and argumentative" questions, at least in the minds of the other closers. –  Wooble Jan 7 '11 at 14:04
3  
@Wooble - Programmers is not for argumentative questions. It is for subjective, but constructive questions. There may be occasion that you get back and forth, but if a question is just argumentative it has no more place in programmers than SO. –  MIA Jan 7 '11 at 14:25

9 Answers 9

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

share|improve this answer
    
This is probably the right explanation. –  Chinmay Kanchi Jan 7 '11 at 15:05
    
Same here at my work. But the files are not simply minfied, they are combined into a single file. Otherwise there would be almost 20 different js files to download. –  Echo Jan 7 '11 at 21:47
    
I minify each part/plugin manually with Closure Compiler then label the sections with /* jQuery x.y */, hoverIntent x.y, etc to keep track. –  DisgruntledGoat Jan 14 '11 at 13:33

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).

share|improve this answer
    
Ah, good to know. –  Pekka 웃 Jan 7 '11 at 14:04
    
Good information, but I Don't think this answers the question. The OP asked why companies were doing this, not if they were allowed to. –  Simon P Stevens Jan 7 '11 at 14:24
1  
-1. By hosting jQuery (or any other code) on your server, your are distributing the code (at least as far as the law is concerned), and the MIT license does require the copyright notice to be left intact. –  josh3736 Jan 7 '11 at 14:33
3  
@josh3736 Could you point out a law that says this? GPL for example has a FAQ that specifically says this doesn't qualify as distributing. There is the Affero GPL licence if you want to disallow that kind of use. –  Rene Saarsoo Jan 7 '11 at 14:57
    
@Rene Saarsoo: The MIT license explicitly states the copyright should not be removed if you are going to "use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software". –  mipadi Jan 7 '11 at 16:06

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.

share|improve this answer
    
+1 for autominification. –  Andrew Neely Aug 10 '11 at 14:27
    
+1 for avoiding possible future hacks. –  kwelch Jul 17 '12 at 13:48

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

share|improve this answer

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.

share|improve this answer
7  
doesn't minifying code remove comments? –  SB01 Jan 7 '11 at 14:00

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

share|improve this answer

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);
share|improve this answer
    
That's why you don't rename the file you download from jQuery. I kinda doubt that jquery-1.4.4.min.js would have conflicting versions. –  James Jan 7 '11 at 16:44
    
yes, but if my script loads jquery-1.4.4.min.js, and their script loads jquery-1.4.1.min.js on the same page, we've got a version conflict... (besides, my script is bundled up into a single JS file for easy drop onto their servers...) –  Mike Ruhlin Jan 7 '11 at 16:50
    
The solution to that is literally identical to your current solution, isn't it? Oh... Unless your jQuery isn't first version loaded. That, and having everything in one convenient file is understandable. :-) –  James Jan 7 '11 at 17:09

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.

share|improve this answer

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.

share|improve this answer