Is it always safe to concatenate javascript files from different sources and load them as one?
<p>I want to <a href="http://stackoverflow.com/questions/486063/what-clever-things-have-you-done-with-an-asp-net-mvc-action-method">concatenate javascript files together</a> and serve them as one from my site - so thats my code and jquery plugins or other 3rd party scripts. (I'm using google CDN for hosting of jQuery).</p>

<p>I was wondering i this is <strong>always</strong> guaranteed to be a safe thing to do. I'm not an expert in Javascript as far as things like namespacing goes and I was just a little worried that it might be possible to have something - like a namespace construct that could cause a conflict. I'm fine in assuming that the javascript is all well formed from each source. </p>

<p>As far as I know a <code>&lt;script&gt;</code> tag essentially just sticks the JS in place as if it was in the file, but I wondered if theres any boundary cases where this isn't true.</p>

<p>I'm aware that concatenation of files is something that is common and used by javascript frameworks such as <a href="http://developer.yahoo.com/yui/articles/hosting/?layout#configure" rel="nofollow">Yahoo's YUI</a> - but obviously they have full control of their files.</p>
