Jump to content

Is there any way to protect source code ?


Dizzee15

Recommended Posts

Yes, with Javascript you can code in a function to disable the "right" click. However it is easily by passed by turning off Javascript or a few tricks like holding the right mouse button then when you left click ok hold the right mouse button again and move it on the page and viola you get the menu. Or just View -> Source.

 

Anyhow someone in this forum should be able to help you, but you can google, "Javascript disable right click" and find an answer quicker.

 

Technically, I would not consider HTML source code. That is more like a template/median used to display data.

Link to comment
Share on other sites

Then I better don't want protection like this. How to absolutely protect my WAP site ?

 

You cannot protect "html" unless you make the client install software of yours to view the website. Then it might be possible, however they could still potentially get the code.

 

Just out of curiosity, why is your HTML output so important to protect?

 

You could take a page out of google's book and use AJAX to display the full page, but this also requires javascript or the user cannot see the page. But if you go into gmail and view the source all you see is Javascript, nothing more. Other than doing that (which with a DOM viewer you may still be able to get the HTML, I do not know as I never tried) yea.

Link to comment
Share on other sites

It's not HTML page, it's PHP and WML in one

First of all you cannot see any php source code as it is parsed server side and displayed to the client as HTML or whatever. Secondly why would you ever need to stop a client from viewing the HTML / WAP or whatever source code in their browser?

Link to comment
Share on other sites

If you're trying to protect the full print out of java in the source code you can look into an external link for your script.  You can put it in a separate js file and deny viewing permissions but allow execute permissions for your servers web service.

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.