Welcome to WebmasterWorld Guest from 54.167.175.218

Forum Moderators: incrediBILL

How to hide the source code from view

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

5+ Year Member



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)

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



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)

5+ Year Member



"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)

5+ Year Member



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)

5+ Year Member



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)

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



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)

5+ Year Member



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)

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



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)

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



<?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)

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



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

Featured Threads

Hot Threads This Week

Hot Threads This Month