General discussion

Locked

Disabling View Source for Web Pages

By Jeremy The IT Guy ·
Is there a way to eliminate someone from viewing my web page's source code? I know there are a few ways with Java Script to disable the right click but then users could go to the menu, View and select code and get to the same spot. Microsoft and many other websites have now gotten to where you can right click and select view source but nothing happens and the back door through the menus doesn't work either. Thanks for your help, Jeremy

This conversation is currently closed to new comments.

10 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Disabling View Source for Web Pages

by MadestroITSolutions In reply to Disabling View Source for ...

I have seen what you are describing before, and I think it has to do with the web server settings. Im not sure how to achieve it though. What I DO NOW, is a stupid little trick that, believe it or not, works better than one would expect. Simply put a lot of spaces before the code (empty lines). When user opens the source, they will see what appears to be an empty document, although your code is still there, but way down. It fools more people than you would think, lol.

Good Luck!

Collapse -

Disabling View Source for Web Pages

by Jeremy The IT Guy In reply to Disabling View Source for ...

Cool trick and it might work but that's not what I'm looking for.

Collapse -

Disabling View Source for Web Pages

by brian In reply to Disabling View Source for ...

I used to work on websites and I would have to imitate client sites. They frequently did things like this to hide their code. I generally managed to avoid asking for html and java. If you use ASP and some other languages that code cant be ripped out as easily.

Collapse -

Disabling View Source for Web Pages

by Jeremy The IT Guy In reply to Disabling View Source for ...

Thanks for the tipe but this isn't the answer I'm looking for.

Collapse -

Disabling View Source for Web Pages

by RRV In reply to Disabling View Source for ...

Just do your web in ASP.NET using your favourite language. It can be any one of 24 languages now. In this web is no more than a windows application development. You can enumerate any menu item in the window and disable or hide it even.

RV

Collapse -

Disabling View Source for Web Pages

by Jeremy The IT Guy In reply to Disabling View Source for ...

Thanks for the tip but this isn't what I'm looking for. If you think that it is and you can prove it, email me at jwhitlock@starprecision.com Thanks, Jeremy

Collapse -

Disabling View Source for Web Pages

by Jeremy The IT Guy In reply to Disabling View Source for ...

There seems to be a problem with some people misunderstanding my question. My question wasn't "How can I keep people from viewing my source code?" it's how do many websites online like Microsoft and MSN keep you from viewing the source code by right clicking and choosing "View Source" or going to the menu and going to "View" then "Source". I am sorry if the problem was my fault but I thought the question was pretty self explanatory. Thanks, Jeremy

Collapse -

Disabling View Source for Web Pages

by mmacd_2000 In reply to Disabling View Source for ...

I can view the source for Microsoft's pages just fine. Same for MSN, except it's onebiglongstringofcodeandreallyhardtoread. But it's nothing unusual.

They DO have linked javascripts, and those don't show up directly. The URL for them does, and you can certainly grab that too if you really want.

Also, I'm pretty sure the pages are generated from server side scripts, and I DON'T see those -- just the HTML/js they generate.

One thing -- if you open a PDF in your browser, and then go toanother page and try to view source, it IS disabled. However, close that window and open a new one, and view source is fine.

Collapse -

Disabling View Source for Web Pages

by Jeremy The IT Guy In reply to Disabling View Source for ...

It appears that the problem was with IE6 and I needed to clear the cache. That was why I couldn't view the source of those two pages along with many more. Thanks for the tip, J

Collapse -

Disabling View Source for Web Pages

by Jeremy The IT Guy In reply to Disabling View Source for ...

This question was closed by the author

Back to Web Development Forum
10 total posts (Page 1 of 1)  

Related Discussions

Related Forums