How can I make sure that my JavaScript files delivered over a CDN are not altered?
<p>I am working on a scenario in which some JavaScript files are to be hosted on a CDN. I want to have some mechanism so that when these file are downloaded on user side, I can ensure that the files were not tampered with and are indeed coming from the specified CDN. </p>

<p>I understand that the task is very easy if I am using SSL, but still, I want to ensure that the right files are served even on HTTP without SSL.</p>

<p>As far as I could search, there is no existing mechanism like digital signature for JavaScript files which is supported across platforms. Perhaps it's not needed?</p>

<p>Is there some method built in to browsers to verify the author of the JavaScript files? Is there anything I can do to do this in a secure way?</p>