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?
I'm thinking of something like this:
1) Computing a checksum and sending this for the server for verification
2) Sending the file as it is in browser memory back to the server for comparison/checksumming.
Is anything like this possible? How can you verify the integrity of the executed javascript given a known-good copy on the server?