View Full Version : Can I hide my source code
koggie411
09-16-2002, 11:29 AM
I don't really know in which category this question belongs, so here goes...
Is it possible to prevent a viewer of my webpage from viewing the source code when he clicks on View > Source in his browser?
Thanks.
BoR|S
09-16-2002, 11:36 AM
Hmmm... you can use some kind of JS to do it, but once user has disabled JS in his browser preferences, it's useless...
Another thing to this, you can set it to be the way the page will detect if you have JS enabled and if not won't show the page...
Anyway, it's impossible to hide the source, there always will be a smart-ass that will find a way to look in the source...
I just curious, why do you need to hide the source?
dabbler
09-16-2002, 12:32 PM
Yes there are ways to stop that beiing done, but you also have to disable "right clic" on the mouse.
And then they'll find a way if they really want to.
If you do find the answer to this -patent it!! You'll make a fortune!
BoR|S
09-16-2002, 12:38 PM
Well as I already said, to disable something, you'll need JS code, once you disabled JS in your browser preferences, the JS will not work and will not disable nothing...
I think there is a way to use the anti-leech engine in a some freaky way so it will help you to hide your source, but does it worth the hard work?
Another idea I can think of, is to use lots of frames, so the user won't see the entire code at once... However, it will just take some more time for the one that wants to see the entire source...
-TheDarkEye-
09-16-2002, 02:11 PM
there is no way to stop someone from viewing the source of an html page you send them. you can make it somewhat difficult to get at and interpret the source but there is no way to stop it from happening.
Delicates
09-16-2002, 02:16 PM
Originally posted by koggie411
Is it possible to prevent a viewer of my webpage from viewing the source code when he clicks on View > Source in his browser?
No.
dabbler
09-16-2002, 02:56 PM
An interesting (?) view on this can be found here (http://www.halfadot.com/freehelp/noclick/copy1.htm) .
But the bottom line is as Delicates says - No.
Delicates
09-16-2002, 03:18 PM
Originally posted by dabbler
An interesting (?) view on this can be found here (http://www.halfadot.com/freehelp/noclick/copy1.htm)
Sadly enough, the creator of that page, like majority of Web developers nowdays, has no knowledge of Web standards. The code he provides is not only invalid, but it only works on the worst browser out there - IE. And all other browsers are absolutely unaffected by it.
And I could add a further step to his attempts by preventing the files from being cached on the HD.
However the harsh fact remains: You can not prevent anyone from accessing or saving your source. And any attempts to do that, are nothing short of pathetic. Whenever I see them, I laugh.
tompet
09-16-2002, 04:04 PM
We've found it difficult to completely hide your source code from all but novices. However, 1st Page 2000 comes with an excellent built-in tool called HTML Source Compressor. This really makes it difficult for anyone to make any sense of your code and at the very least they see it as not worth the effort to try to sort it out.:D
BoR|S
09-16-2002, 08:09 PM
Let's try to come to the problem from a different way, why do you might need to hide your source?
- You made some extra-cool JS.
It worthless to hide it, maybe you don't know, but someone else in the world had already done this super-powerfull-extra-cool script of yours and his much better than yours.
- You have some pictures you don't want the surfer to rip off.
Ever heard of the word cache? Well the pictures you put on the website, are going to be saved on surfers hdd anyway so it worthless to even try to hide their location or disabling it's d/l.
- You're making a warez page and you don't want nobody to leech your links.
So, ppl will just d/l your files and upload it somewhere else.
Crawdaddy79
09-18-2002, 04:35 PM
By the way, you can disable the right click all you want...
Until you figure out how to keep Netscape users from doing it, it's really really useless.
Delicates
09-19-2002, 04:39 PM
What's there to figure out?
Just do it. :D
Waves
09-19-2002, 06:15 PM
The only thing I know is a javascript in IE that can display a message when they right click. If I can find it I will post the code up here.
Delicates
09-19-2002, 06:53 PM
None the less, doing that is still lame.
BoR|S
09-20-2002, 04:03 AM
Well, using scripts that work only for IE, is not lame, it's useless...
Try here: http://www.allmyfaqs.com/cgi-bin/wiki.pl?Hide_source
& Here: http://www.vortex-webdesign.com/help/hidesource.htm
I go with the group sentiment which is - Don't bother.
Truelly there is no way to stop someone from viewing the source.
But I have a few suggestions.(sometimes you want to hide your code if you don't want to let the users see the passwords)
1. Download the MS script encoder.
2. use sever side script,like asp php jsp....
HTH
BoR|S
09-20-2002, 07:18 PM
I still don't get it, why should anyone hide his code? I wrote three possible suggestion in a msg earlier and the explanations why those suggestions are useless... But I'd like to know the thread starter opinion on that...
Melysa
09-21-2002, 03:51 PM
Because a lot of people tend to steal the source code. :D I've been people copy frame, table, CSS type layouts by just copying and pasting the code.
If you like a particular style of layout on the site, somebody can steal the code and insert their own graphics. Happens all the time.
Found a site which explains on how to do it. These were the best methods I think.
1. Use the <INVISIBLE> </INVISIBLE> tags around the entire document.
2. Use the DONTSTEAL attribute in the <BODY> tag.
3. Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) :D
4. Don't put your pages on the web.
:D
spollin
09-23-2002, 08:33 AM
hidden code is annoying. when you see a design technique you like and want to work out how to do it for yourself its very important that you can get the HTML code and play around with it.
if you hide your code then its not really helping other people who are trying to learn by your examples.
thats the way i see it anyway.
karoosoft
09-28-2002, 11:51 PM
Hi - here you go:
you dont have to disable the "mouse right-button click"
Place this at the bottom of any page you want to protect - right
above : </body></html>
~~~~~~~~
replace : "twhosting internet services WARNING ! Content is protected by copyright laws. Ask and we will give." --
with your own message.
you dont have to disable the "mouse right-button click"
That's what the script you attached is doing.
karoosoft
09-29-2002, 08:37 AM
hehe! - David is right to some extent : you cannot hide anything on a web page : but only the "pro's" knows how to bypass page protection.
KZN - is also right if he wants to be so damn accurate - hehe!
the script does prevent "right-click" from displaying the usual menu. but some-one did suggest looking for a way to de-activate the button - hence my remark.
Also - its my first time as a new member - 1st page is the best there is - I have tried them all! The worse??? FrontPage -hehe!
And we all - even the "pro's" - still "pinches" web code if he / she finds a real nice site - True David??
So is everyone else right as well?? - why protect your the site you worked so many hours on to create??
new subject please!!
Ghandi Eximius
10-02-2002, 05:29 PM
You can in fact diable the right click function and in addition, scramble your source code so that it is almost un recognizable to the human eye but runs perfectly still...
Good versions of both scripts can be found at http://www.dynamicdrive.com
BoR|S
10-05-2002, 03:44 AM
How many times it should be repeated... you can't disable right click.
Ghandi Eximius
10-05-2002, 09:09 AM
Im not a huge fan of blocking my source code (or any source code for that matter). The people who want it will find a way to get it no matter what you do, but if you try and block it, you may impede the usability to those who don't give a crap about your source code (which is prodominantly a much larger number than those who do)...
BoR|S
10-07-2002, 10:38 AM
Oh just thought about another solution to hide your source code...
1) Code your own web browser.
2) Include the <hidden> & </hidden> tags...
3) Promote your web browser until it will become the most popular web browser.
4) Make your web page now and include the <hidden> tag at the top and the </hidden> tag at the bottom.
:D
Orange
10-15-2002, 06:10 AM
Its open source. Open source means its free and anyone can use it. Besides anything you can create with the exception of original artwork, most likely has already been done.
Yes, it sucks when someone rips that really cool thing you got on your site. But hey what are you going to do? You can copyright it. Then when you find someone else using your code your can spend all the money on lawyers and sue them . Or you can just deal with it.
If you have art on your site you dont want people to steal. Don't put it up.
If someone wants it bad enough they are going to get it rookie or pro doesnt matter.
Even using server side languages doesnt protect your html, pictures, or javascripts. They still print a html page.
Though if you have copyrighted pictures. You can connect their host and make serious complaints.
But its really a hassle .
DCElliott
10-15-2002, 09:37 AM
I've come across a few sites that attempt to conceal their source -i.e. You can't select View|Source in menu or right-click.
But what have we here . . .
1) Fire up 1st Page and
2) select "Open from the Web"
3) paste in the URL and
4) prestochangeo - there is the source.
I've seen code changers that change your code into Hex - it is more annoying than anything else since a smart code-thief could reverse the effect.
DE
BoR|S
10-15-2002, 09:59 AM
Just disable JS and this will not affect you...
or write view-source:[url] in the address bar:)
There is one way you can hide the code.
1. Create the main web page and put in cgi-bin dir on service. (this dir alway user protection, lock other user out)
2. create other web page and put in main dir.
3. create java and perl scrip and put in main web page in cgi-bin dir.
When ever user call html in cgi-bin, the java and perl will exe and put in other web page.
This will cut alot of code out. But you will have to take some lost due to uncode when other user try to read your code.
HOW THIS WORK ?
When user call the html in cgi-bin dir, the java and perl will run and output information to other html page. This will cut down most of the code you want other user not to read your code. You can throw lot of them and it will have no java & scrip code in it.
OH yet! the html in cgi-bin dir is save and user can not read or copy from it.
cgi-bin is user protection dir. If somebody ftp to your web dir, they can not change dir to cgi-bin dir.
Hope my information correct.
babybarbs
10-28-2002, 01:45 PM
thank you to tompet
finally a straight forward easy answer that can help me
:)
i will try that source compressor tool !!
barbs
legwon
01-21-2003, 11:52 AM
hi all,
im a n00b at this board. ive being doing pages for about 1 1/2 yrs now, and ive tried and tried to block source codes over and over. as most ppl have said,i have found its not possible to 100% block it. there is a code that blocks it from netscape. hehe. now i just have to find it agian. lol.
Java block is nice but like already said if the user has java off then it dosnt work.
EDIT: here is the code that works for Netscape(also works in IE)
insert this into your BODY.
oncontextmenu="return false"
MikeParent
01-22-2003, 04:15 AM
You could be a l33t h@x0r and do it all in Flash :-)
Seriously, all I care about protecting is my ASP/PHP source code.
Code can not be seen in ASP and I don't use php but my
guess is it could not be seen in php, what you have to do in
asp, is to use an includes statement then all they would see
is your includes and they would not see your asp file.
how about the pro's commenting on what I say above am
I right or wrong?....
example I have a form to add data to the database while they
could see the code to the form and to the page that might show the data they never see the file that adds the code to the database and causes the page to bring up the data.
themadpoet
02-24-2003, 05:18 PM
IMHO is that you should be able to block source code from being used by a third party.
You wouldn't expect to see the code that Mircosoft used to create MS Word so why should your creations on the web be seen?
I use no right click as a method to try and at least stop some of the code being seen and also use frames. I have a rival on one of my commerical sites who is currently rebuilding their own site and I don't want to give them all my best routinues.
As a side note. Most Web Award sites wont give awards to sites that disable right clicking.
I have heard of a program called Web Lock Pro which seems to cover most angles including the View Source option, and also the get source option in 1p2000. you can see this software at http://www.weblockpro.com/home.php
Elliott
foxmaster
04-09-2003, 07:30 AM
Use ASP or something like it that compiles the source into what the user can look at. Then, they can't see the "true" source.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.