RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: JavaScript
Expertise: Beginner
Aug 11, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Viewing Source Code

Is there a way to prevent users from using the VIEW/SOURCE to view the HTML in my pages? I need to have this for a form that uses sensitive information in the VALUE field of a drop down menu, and I don't want anyone to be able to just go in and view the source code to retrieve the values.

There are a number of workarounds that can keep some people out of your source, but there is no way to keep all people out of your source.

If keeping 99% of the people out of your source is okay, you'll want to (1) keep out all non-IE users, (2) keep out all non-Windows users, and (3) keep out all users without JavaScript. Then, you can use JavaScript to capture the right-click of the mouse, which will keep some people from viewing your source.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date