Is there a way to delete source code from a page using jquery (when the document loads, when an event is triggered, etc.)? I’m not thinking of the .remove() or .hide() methods; I’d like to actually delete the code from the page.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, because the source code is rendered by the web browser, so unless you plan on deleting the code you send to the client (which seems counter-productive) you will not be able to hide the source code.
However, there are steps you can take to obfuscate the code so that it is more difficult for people to read and understand, but for anyone determined this would only be a small set-back and not an actual hindrance.