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

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

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

Post 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???
Last edited by raghavan20 on Thu Oct 20, 2005 11:36 am, edited 1 time in total.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

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

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post 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...
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post 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...
Post Reply