开发者

Javascript: Detect Changes to JS/DOM on the client side

Is it possible to detect if someone has altered the DOM/JS code on your webpage in the browser?

I'm thinking in terms of an online game written in JS, all the game code would be downloaded to the user's machine, which they can then edit to their will by using common sc开发者_开发技巧ript debugging/inspector tools. Are there any methods for detecting if the DOM/JS code has changed?


No, there is not. Even if there was such an event, it could be deleted or modified, just like the DOM.

If you want to create a game which is hacker-proof, you really need to validate all the user actions on the server side, not on the client side. I had the same questions about security of HTML5 games.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜