Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I hide sensitive information in a web page?

I am trying to send a json object that holds quiz data [including answers] from my code behind to javascript. I used...

var quizJson = <%=jsonObj%> 

but the issue is, my users are smart enough to use view source and reveal the answers. Any suggestion?

Thanks in advance

like image 467
mahfuz01 Avatar asked Dec 20 '25 04:12

mahfuz01


1 Answers

The only correct solution is not to send the answers to the browser in any form. The browser needs to send the answers that the user enters back to the server. Then you use the server-side code to determine if the answers are correct.

like image 53
StriplingWarrior Avatar answered Dec 22 '25 18:12

StriplingWarrior



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!