-4

I want to start selling html items online and want to include a live preview for the user but don't want the user to take the code by using the view source or inspect element selections from right-click menu. I need to remove them, is it possible? I prefer javascript/css/html solutions. (I'm not big on jquery or fiddle)

If not is there a way to link the code and secure the link?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • 2
    No, this is of course not possible. Yes, you can try some amateurish tricks like “disable right click” altogether, but even that won’t work reliable in any browser. If you’re afraid your potential customers might “steal” your HTML code, then your only option is to not show it to them in the first place. – CBroe Mar 15 '14 at 21:40
  • 1
    Doesn't matter. Anyone can just disable JavaScript and then your "protection" is gone. Plus, you can use the keyboard to view the source. – j08691 Mar 15 '14 at 21:40
  • @CBroe I would like the amateur trick please. – Dedicated To HTML Mar 15 '14 at 21:43
  • use high quality print screens/images – Yusaf Khaliq Mar 15 '14 at 21:46
  • Envato and other marketplaces protect your code. Did you take a look at the spurcecodes? Also, when you use PHP/AJAX, your original code is not fully visible, just the generated HTML code. How do you want to sell something when they can not try a real demo? –  Mar 15 '14 at 21:51
  • i would like them to try it in a demo. – Dedicated To HTML Mar 15 '14 at 21:52
  • Then you have to publish the HTML code. And there are always ways to prove that is it your own work ... http://notes.envato.com/authors/how-you-can-protect-your-copyright/ –  Mar 15 '14 at 21:54
  • This is bound to fail, as is almost always the case when you try to solve a _legal_ issue through _technical_ matters. Apart from that, that you even ask this question makes me doubt your experience level in a way that I would say it’s likely fairly questionable if your HTML code is even worth “stealing” (or _selling_, for that matter). – CBroe Mar 15 '14 at 21:58
  • @CBroe Its a 'custom' Audio Player and I've been learning how to make it for quite some time now, because of that i'd like to keep it secure. (I've worked for hours upon hours trying to get it to work, it does now, but can you see why i would want to hide it?) – Dedicated To HTML Mar 15 '14 at 22:04
  • I appreciate the answers - thank you – Dedicated To HTML Mar 15 '14 at 22:13
  • 1
    I'm voting to close this question as off-topic because It is about copyright protection, not programming. – vascowhite Feb 05 '15 at 05:19

1 Answers1

1

This will not work as view-source:// and opening the developer tools with pressing some keys on the keyboard still works ;-)