user1802412
user1802412

Reputation: 53

How to detect or avoid edited javascript from client browser?

i'm new to use javascript
now i can edit my javascript code from browser using firebug.
any idea, to detect or avoid edited javascript from client browser ??

Upvotes: 0

Views: 190

Answers (2)

Cerbrus
Cerbrus

Reputation: 72837

It is not possible to prevent people from tinkering with your js in the browser, since js is sent as-is, from the server.

You can however obfuscate your js to make it slightly harder to edit. (Another link)

Upvotes: 1

Quentin
Quentin

Reputation: 943142

You can't.

You can (and should) use server side code to check that any data sent to the server is sane, but you can't do anything to stop people sending whatever data they like.

Upvotes: 8

Related Questions