title: How to verify that Javascript on client has not been altered
body: <p>Is there any way to verify that the javascript file as loaded (and potentially altered) by the client has not been tampered with by a malicious user? </p>
  
  <p>I'm thinking of something like this: </p>
  
  <p>1) Computing a checksum and sending this for the server for verification</p>
  
  <p>2) Sending the file as it is in browser memory back to the server for comparison/checksumming. </p>
  
  <p>Is anything like this possible? How can you verify the integrity of the executed javascript given a known-good copy on the server? </p>