View Source code

T

tom

Hi,

Is it possible to hide code from the view source file?
For example: I am using vbscript to get info from the
database (ASP) and javascript to put those values into
arrays. I dont want the user to see the arrays when they
go to view>source or when they right-click their mouse to
see view source.

Is it possible to disable the view source altogether?

Thanks.
 
M

Murray

All server code is stripped before the page is handed to the client browser.

Once it is given to the browser, there is nothing you can do to hide the
code.
 
M

Mark Fitzpatrick

Pretty much no. You can include some javascripts that will disable the
right-click event on the browser side, thus preventing that method of
viewing the script. Anyone who is determined though won't have a problem
because the page can be viewed in the cache, or a tool can be used to make a
request and return the raw source without using a browser.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
S

Steve Easton

Not really.
When a page is viewed in a browser, it is already stored in the cache files on the computer.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
T

Thomas A. Rowe

Use another method to load and use arrays, instead of JavaScript so that it is handled on the server
and not the client.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

tom

Hi,

I see. Hmm, in that case how would I disable the right
click event using javascript? (Just wondering, in case it
might need it later on...)

Thanks.
 
T

Tom Pepper Willett

Tom:

This is a topic that is covered in this newsgroup several times a week. It
usually invokes flames ;-)

How do I stop people from downloading my graphics or code?

http://www.jamesshuggins.com/h/web1/how_do_i_stop_downloading.htm

http://www.jimcoaddins.com/protect.htm
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
FrontPage 2003 Product Information:
http://www.microsoft.com/office/frontpage/prodinfo/default.mspx
Understanding FrontPage:
http://msdn.microsoft.com/office/understanding/frontpage/
===
| Hi,
|
| I see. Hmm, in that case how would I disable the right
| click event using javascript? (Just wondering, in case it
| might need it later on...)
|
| Thanks.
|
| >-----Original Message-----
| >Pretty much no. You can include some javascripts that
| will disable the
| >right-click event on the browser side, thus preventing
| that method of
| >viewing the script. Anyone who is determined though
| won't have a problem
| >because the page can be viewed in the cache, or a tool
| can be used to make a
| >request and return the raw source without using a
| browser.
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - FrontPage
| >
| >| >> Hi,
| >>
| >> Is it possible to hide code from the view source file?
| >> For example: I am using vbscript to get info from the
| >> database (ASP) and javascript to put those values into
| >> arrays. I dont want the user to see the arrays when
| they
| >> go to view>source or when they right-click their mouse
| to
| >> see view source.
| >>
| >> Is it possible to disable the view source altogether?
| >>
| >> Thanks.
| >
| >
| >.
| >
 
J

Jim Buyens

Howdy.

No, you can't reliably disable the browser's View Source
command. If you don't want people looking at your data or
your code, move it to the Web server (i.e. change it from
JavaScript to ASP).

True, this will involve more round-trips to the server,
but security never comes free.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Source Code 5
"View source" and css view 2
Access Create option group without using wizard? 2
Viewing source. 6
Prevent mouse right click view source 9
hide source code 3
view source code of web pages 5
front page code different 1

Top