Jump to content

Dis-Able source in IE


chanfuterboy

Recommended Posts

Do you mean view source? You cant do this with PHP. You have to use a client side language such as Javascript. However there is no point in disabling right click > view source as it very easy to work around and doesn't add any protection. You'll just end up irritating your visitors.

Link to comment
Share on other sites

The closes thing you can do is insert thousands of blank lines before starting to output your page. (stupid) visitors might say that the source is not available. Of course this method won't work with addons like Firebug.

 

Or just play with whitespace of your HTML source.

 

Your PHP code is already hidden.

 

If it's for JavaScript, minimize your code.

Link to comment
Share on other sites

Don't do it. Don't waste your time. Simple as that. Legitimate users do not give a crap about your source code. But alot of the time they may want to open one of your links in a new window or a new tab. But you decided to disable that option! Now they are pissed as I would be and I leave your site and say screw them any ways.

On top of which users that want to see your code know that you can always choose page->veiw Source. Also what if I use Firefox, Chorme, Opera, Safari, or a screen reader, you can not stop me. I have so many ways of obtianing the source that you can not stop me, except by not sending me your page in the first place. Don't forget I can also disable javascript or even save your page to my desktop and open it with a text editor. If you are going to use javascript to disable the right click just don't send me your page because I do not want the annoyance and neither do 98% of your normal users!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.