homepage Welcome to WebmasterWorld Guest from 54.196.69.189
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
How to hide the source code from view
cyberlogos




msg:3822176
 7:32 pm on Jan 8, 2009 (gmt 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?

 

pageoneresults




msg:3822187
 7:52 pm on Jan 8, 2009 (gmt 0)

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?

cyberlogos




msg:3822195
 8:00 pm on Jan 8, 2009 (gmt 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.

Trace




msg:3822197
 8:05 pm on Jan 8, 2009 (gmt 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.

cyberlogos




msg:3822230
 8:41 pm on Jan 8, 2009 (gmt 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?

pageoneresults




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

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.

Trace




msg:3822251
 9:10 pm on Jan 8, 2009 (gmt 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]

swa66




msg:3822386
 12:45 am on Jan 9, 2009 (gmt 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.

tedster




msg:3822407
 1:12 am on Jan 9, 2009 (gmt 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.

phranque




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved