473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Disable auto-save of JavaScripts ?

Hello,

I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it !

My clients want to keep their paid-for code proprietary. How do I
prevent this from occuring ?

The javaScripts are embedded in my HTML in the following manner:

<SCRIPT SRC="/effects/top-menu.js"></SCRIPT>

...all someone has to do is strip out the URL part after my clients
domain name, and drop the above in after it, and hit enter - an
auto-save dialog pops up letting them download the scrpt. One of the
reasons for not including the code directly in the HTML is to try to
keep it proprietary (the other being so if I need to make a change to
it, I don't have to change all my HTML pages).

Any suggestions to ju**@barryoneill.com would be appreciated.

Thanx,

Barry O'Neill
Jul 20 '05 #1
5 3397
In article <86**************************@posting.google.com >,
ju**@barryoneill.com (Barry) writes:
Hello,

I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it !
Yep, thats the way it works. Well, depending on how the browser is setup to
manage .js files. But anyway, its moot.
My clients want to keep their paid-for code proprietary. How do I
prevent this from occuring ?
Remove it from the web. Now, its safe. Otherwise, it can be gotten.
The javaScripts are embedded in my HTML in the following manner:

<SCRIPT SRC="/effects/top-menu.js"></SCRIPT>

..all someone has to do is strip out the URL part after my clients
domain name, and drop the above in after it, and hit enter - an
auto-save dialog pops up letting them download the scrpt. One of the
reasons for not including the code directly in the HTML is to try to
keep it proprietary (the other being so if I need to make a change to
it, I don't have to change all my HTML pages).


Again, thats the way it works. After you manage to come up with some hack to
try to stop this from "working", you will be asking how to stop
view-source:absoluteURLToJSFile.js from working. Then, how to stop it from
being gotten from the cache? Or, File>Save As in IE will save the file as well.
In short, take it off the web. Otherwise, it can be gotten.
--
Randy
Jul 20 '05 #2
ju**@barryoneill.com (Barry) writes:
I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it !
My browser just shows the code as text. I can save it easily.
My clients want to keep their paid-for code proprietary. How do I
prevent this from occuring ?
Don't put it on the web! There is no other way!

If anybody claims to have a way to send code to the browser and have
it executed, and at the same time prevent the user, whose browser it
is, from seeing the code, they are either lying or clueless.
One of the reasons for not including the code directly in the HTML
is to try to keep it proprietary


It makes no difference, except against people who wouldn't be able
to read the code anyway.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3
Lee
Barry said:

Hello,

I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it !

My clients want to keep their paid-for code proprietary. How do I
prevent this from occuring ?
It's too late now, but the general rule is that you should
avoid taking on paying customers until you know a little bit
about how web servers and browsers work.

Any suggestions to ju**@barryoneill.com would be appreciated.


Welcome to USENET. You shouldn't ask for email responses here.

Jul 20 '05 #4
> My clients want to keep their paid-for [JS] code proprietary.

Short answer: Not possible.
Longer answer: Remember that since Javascript is a client-side technology, every script runs on the machines
of your visitors. That means that in the end, every piece of Javascript has to be transferred to them somehow,
and after that point you've of course no control of what they'll be doing to it (saving, copying, printing,
....). Even if you find some way of setting IE to prevent the right-click menu and prevent "view-source:"
requests and prevent what-not, you can't be sure how it behaves in other browsers. Finally, what do you do if
I'd telnet to your server and request the script manually via GET?

The solution is to run your code on the server, since then there's no need for it to be sent around.
Server-side scripting is something completely different though, have a look at PHP or Perl if you are
interested in that (Javascript won't do).

Best regards
Hendrik Krauss

Jul 20 '05 #5
VK
It is possible, but only if your clients' network has fixed external IP(s).
Then you can check each request against this IP(s) and either serve it
or deny it.

Respectively you can serve separate parts of the page (scripts, applets)
based on the IP check.

If your customers using server-assigned IPs (or if there are not any
customers,
you just want to protect your software from copying) then you are out of
luck.

JavaScript/JScript/VBScript and Java (yes, Java too) code is open-source
software by their nature.
If you invented some ground-breaking algorithm, use it in a native
application.

Still the law of Parkinson-Murphy remains in effect:
"Anything created by one human being can be disassembled and/or altered by
another human being".
(The "Black box vulnerability" law)

Barry <ju**@barryoneill.com> wrote in message
news:86**************************@posting.google.c om...
Hello,

I've recently noticed that someone can simply type in the URL to my
javaScript, from my HTML source code, to the explorer location bar and
an auto-save dialog pops up to let them save it !

My clients want to keep their paid-for code proprietary. How do I
prevent this from occuring ?

The javaScripts are embedded in my HTML in the following manner:

<SCRIPT SRC="/effects/top-menu.js"></SCRIPT>

..all someone has to do is strip out the URL part after my clients
domain name, and drop the above in after it, and hit enter - an
auto-save dialog pops up letting them download the scrpt. One of the
reasons for not including the code directly in the HTML is to try to
keep it proprietary (the other being so if I need to make a change to
it, I don't have to change all my HTML pages).

Any suggestions to ju**@barryoneill.com would be appreciated.

Thanx,

Barry O'Neill

Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rawCoder | last post by:
If an item is added in a grid, then the grid scrolls automatically either to bring the selected or the last entered item in focus. Is there a way to disable this scrolling. Means, If I am...
0
by: Ian | last post by:
When you add a control to the web form designer in VS.NET, say a label called "InheritanceTestLabel", VS.NET automatically adds the following line to the code-behind. protected new...
2
by: John Holmes | last post by:
I saw a similar post that went unanswered about a month ago. I am annoyed by the auto-formatting that occurs when creating my form. I'll make changes to the code (HTML tab) and then view them in...
2
by: hb | last post by:
Hi, The auto-formatting of HTML code in Visual Studio.Net 2003 is very annoying! I already unchecked the 2 checkboxes in "Apply Automatic Formatting" section located at: Tools-->Options-->Text...
9
by: junlia | last post by:
Does anyone how how can we disable the auto-postback feature in asp.net page? I have to use a server side control in the page, but the auto post back feature in it causes problems for me. Please...
24
by: Agnes | last post by:
I need to disable the exit button in the form . However, the min. and max. button need to keep it How ? Thanks a lot From Agnes
2
by: KKuser | last post by:
Hello: I currently use Me.FormBorderStyle = FormBorderStyle.None to hide the tile bar, but it looks quite ugly. It's easy to disable the "X" button using VB6, but I really can't find out...
1
by: Julien Grossiord | last post by:
Hello, As I do not need it, I would like to disable ViewState on my server but even if I use <pages enableViewState="false"> in web.config or <%@ Page EnableViewState="false" .... %> in my...
2
by: Joe Cool | last post by:
When I put a disk in my dvd drive, most of the time windows askes me how I want to process the files on the disk. Sometimes, it will automatically open a browser window showing the contents of the...
0
by: =?Utf-8?B?Y29kZW11dHQ=?= | last post by:
I've got a problem where my HTTP WCF messages are not going where I want them to go because my company has tightened its proxy restrictions. Basically the AUTO-DETECTION of a proxy that has been...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.