Welcome to WebmasterWorld Guest from 50.19.0.90

Forum Moderators: incrediBILL

Message Too Old, No Replies

How to hide the source code from view

     
7:32 pm on Jan 8, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 1, 2009
posts: 17
votes: 0


There are some sites where you clic on your menu bar "View/Source" and nothing shows, as if you havenīt clicked at all. How do they manage to do that?It is so cool and you donīt have to encode your source code. Is it PHP programming or... how do they hide it?
7:52 pm on Jan 8, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts: 12166
votes: 51


Hello cyberlogos, Welcome to WebmasterWorld!

How do they manage to do that?

Are you sure? Check the scroll bar, did they push all the code down to line 1000+ to make you think there was nothing there? I do it from a satirical standpoint and it does trick people into thinking the source code is protected. The further down the page you push it, the smaller the scroll bar becomes and the less obvious it is. ;)

If you see something other than that, I'm sure there is some sort of JavaScript at play and it can be easily bypassed. Unless there is something out there I'm not aware of that allows you to hide your source?

8:00 pm on Jan 8, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 1, 2009
posts: 17
votes: 0


"Are you sure? Check the scroll bar, did they push all the code down to line 1000+ to make you think there was nothing there?"

Yes I have seen that in some web codes as you VIEW the source. But in this case after clicking on the View bar nothing happens, it does not even open the source box. I am puzzled... let me see if I find the url for you to check out. Thanks for your thread.

8:05 pm on Jan 8, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:July 5, 2005
posts:352
votes: 0


There is no way of hiding a pages source.

There are a couple reasons why you might "think" you cannot access the sites source;

- Internet Explorer has a hard time displaying a pages source code when the cache gets too large in size. Simply deleting your temporary Internet files normally corrects this problem.

- The page creator might have added a bunch of carriage returns (blank lines) right at the top of their file, making it appear to be, at first glance, a blank page when in fact, scrolling down you'll find the source.

- The site might have been created using XML/XSLT instead of basic straight forward HTML & CSS. Viewing the source on such a site might surprise you. A good example of this can be found on the StarCraft 2 website.

There are other reasons as well but all that to say, if your browser can render the page, you can access it's source.

8:41 pm on Jan 8, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 1, 2009
posts: 17
votes: 0


Indeed it has surprise me:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="layout/frontpage.xsl"?>

<page lang="es_es">
<frontpage/>
</page>
and that is all for a sucint source code, cool that XML/XSLT is.

As soon as I find the url preventing the view to appear Iīll post it.
Thanks for your thread Trace.

Which advise is there to prevent copy/paste from Modzilla browser?

9:03 pm on Jan 8, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts: 12166
votes: 51


All these years viewing source and I'll have to admit that this is a first. I've not seen a site served that way before, interesting.

Just take the

layout/frontpage.xsl
and append it to the URI to see the source. And then there will be other children to append so you can see more. That is a work of art from a coding perspective.

Thanks Trace.

9:10 pm on Jan 8, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:July 5, 2005
posts:352
votes: 0


We've been using this method a lot for the past couple of years while working with the MS SharePoint platform but I was quite surprised to see it used to such an extreme.

I want to work for Blizzard. :)

edit: My edit needs to follow pageoneresults edit.

[edited by: Trace at 9:12 pm (utc) on Jan. 8, 2009]

12:45 am on Jan 9, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


If you give it to a browser to render, anybody else with knowledge can get it too.
E.g. the unix commandline tool wget will create a local file in a snap and it can mimic any browser if you want to go into the risky business of browser sniffing.

Assume those who want to have your source code have it.

1:12 am on Jan 9, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="layout/frontpage.xsl"?>

<page lang="es_es">
<frontpage/>
</page>
and that is all for a sucint source code, cool that XML/XSLT is.

The Web Developer Toolbar for Firefox offers two choices - "View Source" and "View Generated Source". The second option will show the full source code in this kind of situation.

2:09 am on Jan 9, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


and tools (like the html tidy button which comes with the ff Web Developer add-on) that bypass the right-click contextual menu...
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members