473,466 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

There is no way to hide code (continued): how to read statistics?

A while ago I posted a message saying that saving Javascript code as
external file might hide the code better. All replies to it said it
would still be very easy for people to look at the source code. I
sometimes look at the source code if a page is impressive or
interesting, but have never opened any external file.

As experiment, I saved a Javascript code of a web page as the external
file of it. After several days, I looked at the statistics of the web
site, and found the web page was hit, for instance, 100 times, and the
external files was hit 35 times.

Does this mean that the external file was separately opened 35 times?

Thanks.
Dung Ping

Oct 13 '05 #1
6 1278
Lee
Dung Ping said:

A while ago I posted a message saying that saving Javascript code as
external file might hide the code better. All replies to it said it
would still be very easy for people to look at the source code. I
sometimes look at the source code if a page is impressive or
interesting, but have never opened any external file.

As experiment, I saved a Javascript code of a web page as the external
file of it. After several days, I looked at the statistics of the web
site, and found the web page was hit, for instance, 100 times, and the
external files was hit 35 times.

Does this mean that the external file was separately opened 35 times?


That means that your main web page was hit 35 times by people who hadn't already
cached the external js file. The file must be downloaded to their browser in
order to work. That's another reason why it isn't secure.

For what it's worth, just this morning I hit a production web page that didn't
work properly in Firefox, so I looked at the source which led me to their
external js file. I opened that and found the error and reported it to the
webmaster. Very easy.

Oct 13 '05 #2
Dung Ping wrote:
As experiment, I saved a Javascript code of a web page as the external
file of it. After several days, I looked at the statistics of the web
site, and found the web page was hit, for instance, 100 times, and the
external files was hit 35 times. Does this mean that the external file was separately opened 35 times?


No, it means that there were 100 hits to the web page, and 35 hits to the
script file. Its possible that none of those hits were from people actually
looking at the page and that 35 people opened it by hand, but its unlikely.
More likely of the 100 hits to the main page, some were revisits and had
the script file in their cache (and didn't bother downloading it again),
and some were from clients without JavaScript (such as GoogleBot).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Oct 13 '05 #3
On the other hand, you can thwart a passing attempt at getting your code
by denying it to be served if the http referrer isn't equal to the page
it's supposed to be served from.

If anyone types the URL of the JS file directly into their browser
they'll get squat.

Of course, this won't even really slow down someone who is determined to
get your code.

-Jeremy

Dung Ping wrote:
A while ago I posted a message saying that saving Javascript code as
external file might hide the code better. All replies to it said it
would still be very easy for people to look at the source code. I
sometimes look at the source code if a page is impressive or
interesting, but have never opened any external file.

As experiment, I saved a Javascript code of a web page as the external
file of it. After several days, I looked at the statistics of the web
site, and found the web page was hit, for instance, 100 times, and the
external files was hit 35 times.

Does this mean that the external file was separately opened 35 times?

Thanks.
Dung Ping

Oct 13 '05 #4
On 13/10/2005 23:46, Jeremy wrote:
On the other hand, you can thwart a passing attempt at getting your code
by denying it to be served if the http referrer isn't equal to the page
it's supposed to be served from.
But that will prevent anyone from accessing the script if they choose to
prevent their browser from sending the Referer [sic] header, or use a
proxy that strips it. Referer checks should only be made if a header is
actually sent.

[snip]
Of course, this won't even really slow down someone who is determined to
get your code.


True. Telnet and wget, to name two ways.

Mike
Please don't top-post to this group.

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Oct 13 '05 #5
Michael Winter wrote:
[snip]
Please don't top-post to this group.


My apologies. I never really understood the emnity for top-posting, but
if them's the rules then that's that.
Oct 13 '05 #6
Jeremy wrote:
My apologies. I never really understood the emnity for top-posting, but
if them's the rules then that's that.


Argh. s/emnity/enmity.

*makes coffee*
Oct 13 '05 #7

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

Similar topics

5
by: Jesper Jensen | last post by:
Hello group. I have an issue, which has bothered me for a while now: I'm wondering why the column statistics, which SQL Server wants me to create, if I turn off auto-created statistics, are so...
0
by: Mike G | last post by:
Greetings, I hope this is an appropriate place to ask this. I have written a C# Windows Service that Traces important information and statistics. It is required for me to create a seperate Windows...
2
by: Lyn Duong | last post by:
Hi, I have a job that performs a runstats on tables in my database (db2 V8 on AIX) and the syntax is db2 runstats on table schema.tabname with distribution and detailed indexes all. when I...
3
by: Ahmet | last post by:
Hi, I have one application in which I cyrpto password using a keyword. But when a user examines my binary using ildasm, he can see both my cyrpto key and cyrpto method. How people hide their...
2
by: Øyvind Isaksen | last post by:
Is it possible to show/hide a usercontrol code behind? <uc1:topart id="Topart1" runat="server"></uc1:topart> This is what i want to do, but this does not work: if objDR.read me.Topart1.show...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
4
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last...
8
by: Paul H | last post by:
I want to base a form on a crosstab query. The query shows statistics for a user defined period. The column headings will look something like this: ClientID Month01 Month02 Month03 etc.. ...
17
by: lbrtchx | last post by:
Like this one? http://commons.apache.org/math/userguide/stat.html Basically I need the mean, standard deviation and skewness and preferably a legal hassles free one Thanks lbrtchx
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.