how to make html code not visible in firefox

J

Jan PA1RQR

Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this is
working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.
Thanks for help. Jan (NL)
 
H

Harlan Messinger

Jan said:
Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this is
working in I.E.

You have a way to keep users from selecting View | Source on the browser
menu? From turning off Javascript? From switching to another browser?
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.

How will you keep Firefox from responding to Ctrl-U?
 
J

Jonathan N. Little

Jan said:
Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this is
working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.

Jan, the answer is very simple, you cannot, except by not putting on a
server ;-)

My advice, do not bother. Markup is not that precious. Copyright your
content an be done with it. Basic observation: "The value of the markup
is inversely proportion to author's desire to protect it"
 
T

the red dot

Jan PA1RQR said:
Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this is
working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.
Thanks for help. Jan (NL)
what have you invented in regards to html that you need to hide?
 
C

Carolyn Marenger

Jan said:
Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this
is working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.
Thanks for help. Jan (NL)

I doubt that it is possible, and even if it was, it could be bypassed quite
easily. Except as an experiment to see if you can do it, I wouldn't
bother. If the code is any good, it will get copied - nothing you can do
besides not publishing it.

Carolyn
 
N

Neredbojias

Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton,
this is working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right
mouse button.
Thanks for help. Jan (NL)

Do your home page in Flash, etc.
 
V

Vince Morgan

Jan PA1RQR said:
Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this is
working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.
Thanks for help. Jan (NL)
It takes about 20 mins to write a simple application that can make http
requests and download the data as text.
And, there is virtualy nothing you can do to prevent that.
Vince Morgan
 
V

Vince Morgan

Vince Morgan said:
It takes about 20 mins to write a simple application that can make http
requests and download the data as text.
I mean markup, rather than "data".
 
L

Leif K-Brooks

Vince said:
It takes about 20 mins to write a simple application that can make http
requests and download the data as text.

Much less time if you use a nice programming language, and don't mind
libraries.

Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information. '<html><head>...'
 
E

Ed Seedhouse

Jan PA1RQR wrote:
I doubt that it is possible, and even if it was, it could be bypassed quite
easily. Except as an experiment to see if you can do it, I wouldn't
bother. If the code is any good, it will get copied - nothing you can do
besides not publishing it.

Considering that you must send the actual html source for the page to be
displayed at all, and that the display device is normally a fairly high
powered computer, the idea strikes me as both futile and silly.
 
C

Carolyn Marenger

Vince said:
It takes about 20 mins to write a simple application that can make http
requests and download the data as text.
And, there is virtualy nothing you can do to prevent that.
Vince Morgan

I wouldn't even go that far. I would just use the File->Save As to save it
to my drive, then an editor to read it. I can then copy and paste any
links that I want and copy them too. :)

Carolyn
 
A

Arjen

Jan PA1RQR schreef:
Hello,
I have made a homepage with a small javascript routine to suppress the
visablility of the sourcecode when you press the right mousebutton, this is
working in I.E.
But in firefox the code is still visible.
Q. How can I make the sourcecode not vissible when I press the right mouse
button.
Thanks for help. Jan (NL)

First of all i wouldn't recommend hiding your source code.

But if you really insist you can make it more difficult. You could use
an ajax request to fill the page. That way the final source code wont
show up with view source. There are easy methodes of viewing the
generated source but imho not many 'simple visitors' know how. Offcourse
not all browsers are compatible (many are dough)

Arjen
 
D

dorayme

Ed Seedhouse said:
Considering that you must send the actual html source for the page to be
displayed at all, and that the display device is normally a fairly high
powered computer, the idea strikes me as both futile and silly.

It would be like company secrets and would doubtless benefit some
of those who did it. Not sure the description of silly or futile
is apt.

I would say it is a bad idea generally for similar reasons to
those that make it a good idea to have open source programs. But
there are arguments both ways on this issue. It may be that
companies would put more effort into development if their
operations were not quite so open.
 
D

dorayme

Carolyn Marenger said:
I wouldn't even go that far. I would just use the File->Save As to save it
to my drive, then an editor to read it. I can then copy and paste any
links that I want and copy them too. :)

Is this getting the source markup?
 
B

Ben C

On 2006-12-21 said:
I would say it [hiding HTML source code if you could] is a bad idea
generally for similar reasons to those that make it a good idea to
have open source programs. But there are arguments both ways on this
issue. It may be that companies would put more effort into development
if their operations were not quite so open.

It's often the opposite though. There are a lot of companies whose
"mission critical" products you wouldn't dream of buying if you'd seen
the ball of mud source code they were compiled from.
 
D

dorayme

Ben C said:
On 2006-12-21 said:
I would say it [hiding HTML source code if you could] is a bad idea
generally for similar reasons to those that make it a good idea to
have open source programs. But there are arguments both ways on this
issue. It may be that companies would put more effort into development
if their operations were not quite so open.

It's often the opposite though. There are a lot of companies whose
"mission critical" products you wouldn't dream of buying if you'd seen
the ball of mud source code they were compiled from.

Yes, this is a point!

Slightly similar but not as bad: I'd hate to let a client see my
duffing about making their website, they would surely lose
confidence.
 
J

Jeff Bowman

Vince Morgan said:
It takes about 20 mins to write a simple application that can make http
requests and download the data as text.
And, there is virtualy nothing you can do to prevent that.
Vince Morgan

Heck, you can do it with a single entry at a telnet prompt :)
 
E

Ed Seedhouse

It would be like company secrets and would doubtless benefit some
of those who did it. Not sure the description of silly or futile
is apt.

It is clearly futile since you can't send someone unencrypted plain text
and expect that they won't be able to look at it. And you must
necessarily do so if you want someone to look at your web page. Silly is
a value judgement I admit, but I stand by it. I think it's silly to
want something that is self contradictory.
 
H

Harlan Messinger

Arjen said:
Jan PA1RQR schreef:

First of all i wouldn't recommend hiding your source code.

But if you really insist you can make it more difficult. You could use
an ajax request to fill the page. That way the final source code wont
show up with view source. There are easy methodes of viewing the
generated source but imho not many 'simple visitors' know how. Offcourse
not all browsers are compatible (many are dough)

And of course this means the website won't be available to people who
don't have Javascript turned on.
 
F

Floortje

Harlan Messinger schreef:
And of course this means the website won't be available to people who
don't have Javascript turned on.

Yup and images wont get displayed if you turn hem of as well :)

Anyway .. that's easily avoided with some server side scripting.

check if ajax is supported if no session is registered with default no.
Then let the server descide to display the original source code or use
an ajax request

example
// shows the content .. redy to be requested by ajax call
http://www.hondenpage.com/ajaxrequest.php?pid=1
// shows complete page
http:/www.hondenpage.com/index.php?pid=1

offcourse anyone can still view the source by disabling javascript (that
problem allready existed with op) and by requesting the ajaxrequest.php
or viewing thx request headers but normal viewers on a site wont go that
far

Arjen
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top