Click to See Complete Forum and Search --> : How does someone block "view source"?


Rifter72
05-19-2004, 09:27 PM
I know this has been talked about before, but always the answer seemed to be that you cannot block someone from viewing your source code. While reading an article about web site design, it mentioned this site (http://www.tritondxb.com/html.html) and the author wanted feedback on the layout of the site. So I went to view source and a box appears that says copyrighted and when I went to file, view source, it brought up a bunch of gobblygook. So how did they do it? I'm a newbie in many areas of this and I've never run across a site that I couldn't view the source code.

Thanks in advance.

rhsunderground
05-19-2004, 10:46 PM
the site was probably encrypted, or you computer was messed up. i can't see why you would want to hide your source code, unless it is crap. if you're trying to save your images, it won't work.

ray326
05-19-2004, 11:31 PM
It's not gobblygook, it's Javascript. He's just encoded the text of the site and decodes it on the fly with standard Javascript.

The Cheat
05-19-2004, 11:38 PM
ya thats accessible :rolleyes:

coothead
05-20-2004, 12:37 PM
Hi there Rifter72,

Those encrypted sites can be bypassed
quite easily in a few seconds :D
Check out this site for a variety of options...

vortex-webdesign.com (http://www.vortex-webdesign.com/help/hidesource.htm)

coothead

MstrBob
05-20-2004, 02:51 PM
Yep, it is easy to get the source code. The page in particular you posted though, it's source is definately NOT worth copying. It uses tables for layouts, and to even view the website you need a browser with Javascript. If your interested, the source code is below, I definately would NOT recommend copying his technique

Rifter72
05-20-2004, 06:53 PM
Thanks for the replies everyone. The funny thing is, I went back to the article that I originally found this site referenced on, and EVERYONE that responded said just what you guys are saying:

Sloppy HTML
Crappy code
Get rid of the splash page
Stupid for trying to hide source code
etc,etc,etc.

That was just too funny. Anyway, thanks for the links and stuff!

PeOfEo
05-20-2004, 10:42 PM
why the hell would anyone waste their time with such stupid measures. There is no way to prevent me from getting images and client side source code because my browser has to download and read it to display it. What a freaken moron. You know what, I take that back, he made his site so inaccessible and nasty with that crap that no one would want to take his source, he succeded sort of.

my email to the webmaster
Look at your source code. Is that a site entirely based on javascript? 13% of the internet does not support it accorrding to last year's stats at thecounter.com. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tritondxb.com%2Fhtml.html Can't even make it valid 4.01 transitional. Look, if you were cutting up any % of my business with that javascript and could not even take the time to make this thing valid there is no way in hell I would hire you. Oh yea, your source code is very easy to get, if my browser can display it, I have downloaded it. All your encodeing does, is forces me to spend 2 extra seconds and decode your scipt. But I do not know why you go out of your way and make your script harder to read, no one wants to take that crap anyway. -Nick
I am a real jerk, but it feels good to call people on their lazyness / assdom.

spufi
05-21-2004, 05:57 PM
They are hiding thier code because they are too embarrassed to have it viewed. :p

PeOfEo
05-21-2004, 10:50 PM
lol probably. If they spent half the time it took them to do that encodeing and deal with it being unorganized on writing their code correctly theny they would not have to be embarassed.