Page 1 of 1

Is it possible to hide javascript or few link tags?[SOLVED]

Posted: Tue Oct 18, 2005 4:45 am
by raghavan20
I am wondering is it possible to hide javascript and css links from showing up in view source.
I have seen a few sites where the first page in view source consists of so many blank lines...are they hiding something...if yes, how do they do it???

Re: Is it possible to hide javascript or a few link tags??

Posted: Tue Oct 18, 2005 5:32 am
by Roja
raghavan20 wrote:I am wondering is it possible to hide javascript and css links from showing up in view source.
No.

You can obscure the display or you can delay the display, but you cannot hide the display.
raghavan20 wrote:I have seen a few sites where the first page in view source consists of so many blank lines...are they hiding something...if yes, how do they do it???
You'd have to give specific examples so we could give specific answers for that particular page.

Posted: Tue Oct 18, 2005 5:44 am
by feyd
the blank line thing is purely: the page has, most often, been encoded into a Javascript encoding. The page code is output with lots of blank lines before the javascript is emitted giving the illusion of no code on the page to a lot of people.. nothing new, and nothing note worthy. Hiding one's page code isn't beneficial from most stand points. The only time it's half usable is when it actually compresses the page code, but I'd much rather use gz compression of the HTTP response first.

Posted: Wed Oct 19, 2005 4:55 am
by n00b Saibot
true, you can obscure or delay but you can't hide... everything viewable in browser is downloaded to client. and once source is downloaded, everything is for viewer's to see/hack/do w/e...

Posted: Wed Oct 19, 2005 8:38 am
by raghavan20
What do you actually mean by obscuring the output?? can you show me an example how well its incomprehensible? if its good enough, may be i can try to do the same.

Posted: Wed Oct 19, 2005 8:48 am
by feyd
given a tiny bit of knowledge about Javascript, the page code can be read with ease, no matter what.. so it's largely a waste of time to do it. If you insist, google page obfuscators and compressors

Posted: Wed Oct 19, 2005 9:04 am
by foobar
Obfuscating code that reaches your users' browser is pretty pointless, I'd say. It's very likely that you don't have anything worth hiding anyway. Websites with awesome designs show their code, so why shouldn't you? If it's good, show it off! Don't hide it! You can't do it properly anyway, so why bother...