Forums

This topic is locked

Preventing User from View Source

Posted 03 Nov 2003 17:02:38
1
has voted
03 Nov 2003 17:02:38 NaiWah Lui posted:
Hi

How do i prevent user from viewing my html source? I have seen other website that has this feature like when you click on the View menu and choose source, and it would not allow to display in text format.

Thanks

Replies

Replied 03 Nov 2003 22:48:36
03 Nov 2003 22:48:36 Janusz Jasinski replied:
Hi,

ou can't, as far as I know. If it's really important, you can use Java
Script to "encrypt" the code, so that it get's harder to look at. The
problem is that there are browsers that don't use JavaScript.

Try www.htmlencrypt.com/ or make your own. Basically, you put
the entire encrypted HTML code in one or more variables. You then have
a function which decrypts it and display the HTML code. When a user
tries to view the HTML code, (s)he will only see the encrypted string,
but it won't stop someone with basic programming skills.

What website is it that you are talking about?

Janusz

======================
janusz.monkey-it.co.uk

ASP | VBScript | IIS 5.1 | Windows XP Pro | Linux Redhat 9 | SuSE 9 Pro | Linux FreeBSD 4.9 | PHP 5.0.0 Beta 2 | MySQL 4.0 | Apache 2.0.48 | Macromedia Studio w/t Flash 2004 | Microsoft Office Pro 2003 | Mozilla Firebird 0.7 | IE 6 | B.O.R.E.D @ HoMe
Replied 03 Nov 2003 22:50:45
03 Nov 2003 22:50:45 Janusz Jasinski replied:
Plus,

if they know NEthing about computers, internet etc, they'll just save the page and view the code - as soon as it's on the net, it's there for public viewing... unless U use ASP, PHP etc, then they can't see the actual ASP/PHP code

Janusz

======================
janusz.monkey-it.co.uk

ASP | VBScript | IIS 5.1 | Windows XP Pro | Linux Redhat 9 | SuSE 9 Pro | Linux FreeBSD 4.9 | PHP 5.0.0 Beta 2 | MySQL 4.0 | Apache 2.0.48 | Macromedia Studio w/t Flash 2004 | Microsoft Office Pro 2003 | Mozilla Firebird 0.7 | IE 6 | B.O.R.E.D @ HoMe

Reply to this topic