How to prevent user from executing javascript code from console? -


I am storing some sensitive data on Javascript. How can I stop these data from tampering? I can not do this on the server side with AJAX or something else, as the smoothness of the animation is concerned

Make any javascript inaccessible to anyone using function scope etc. This is not correct, but it can definitely make things that are very difficult, for example, if you define:

  var f = function () {return "test"; } F ();  

Then it is easy to call window.f ()

Instead you define yourself as the implementation function, So you just created it to call someone very hard:

  (function () {return exam;}); This principle can be enhanced - within any variable defined within the function it will only get the scope, but it will be difficult to catch (but probably not impossible). > 

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -