473,320 Members | 2,004 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,320 software developers and data experts.

Linking Java Script

How can I include a 'link' to javascript in a web page so all the javascript
code won't be readily accessible in the source view? I have a bit of code
and would rather not include it. with the html code. Thanks.

Friendly Indian
Jul 20 '05 #1
3 1357
In article <ZH********************@twister.nyroc.rr.com>, "Friendly Indian"
<ne*******@please.com> writes:
How can I include a 'link' to javascript in a web page so all the javascript
code won't be readily accessible in the source view? I have a bit of code
and would rather not include it. with the html code. Thanks.


<script type="text/javascript" src="URLToTheJSFile.js"></script>

It still doesn't stop any one with the slightest knowledge of the web or there
browser to see your code.

view-source: URLToTheJSFile.js in your address bar.
--
Randy
Jul 20 '05 #2
Friendly Indian wrote:
How can I include a 'link' to javascript in a web page so all the javascript
code won't be readily accessible in the source view? I have a bit of code
and would rather not include it. with the html code. Thanks.


It depends on what you mean with "not include it". You *must*
include *any* script code that should have the chance to work,
only the methods of inclusion are different. You could use

<head>
...
<script src="$URI" type="text/javascript"></script>
...
</head>

to link an external script file containing the code.

But doing this only for the purpose of obscurity is nonsense. People
who want to get their hands on the code are usually smart enough to do
so. (Those who do not want to type the URI in the Location Bar just use
a bookmarklet.) The others are to stupid to re-use the code or simply
do not care about it.

Security by obscurity does not work. Your scripts are a work of mind
and as such copyrighted by law in most countries. You should instead
emphasize that fact (in a comment) and also include a license agreement
that specifies to what extent your code can be modified, re-used, and
distributed so that others can draw advantage from it or even can
improve it (so if the code is good your name spreads throughout the
hacker[1] community). See also: GNU General Public License (GPL).[2]
PointedEars, IANAL
___________
[1] Do not confuse hackers with crackers.
The former build, the latter destroy.
[2] http://www.gnu.org/licenses/licenses.html#GPL
Jul 20 '05 #3
In article <40**************@PointedEars.de>, Thomas 'PointedEars' Lahn
<Po*********@web.de> writes:
[1] Do not confuse hackers with crackers.
The former build, the latter destroy.


Are you actually as stupid as you appear to be at times?
--
Randy
Jul 20 '05 #4

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

Similar topics

0
by: nam | last post by:
could someone please help me with this bizarre problem - I've created a swf file at the top of my html page. The swf file (using Swish) is simply a menu of 5 links to 5 anchor points on the html...
1
by: Joel Barsotti | last post by:
Is there anything builtin to ASP.net that allows you to tie a text box to a button so when you press enter in the text box it emulates clicking a near by button. I've coded up some client side...
7
by: Hal Vaughan | last post by:
I have a problem with port forwarding and I have been working on it for over 2 weeks with no luck. I have found C programs that almost work and Java programs that almost work, but nothing that...
3
by: walkeraj | last post by:
I'm trying to compile an open source game called IVAN , and I'm able to compile it from a makefile, but not from an IDE. I have attempted to recreate the way the makefile compiles the project as...
0
by: Roux Claude | last post by:
Bonjour, We have implemented Python as an "embedded script language" in our NLP application, XIP which a grammar rule engine written in C++ and available as a library. We have also developped...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
3
by: Eric1987 | last post by:
Hi, I am currently doing my java assignment. In this assignment, I had require to build a JFrame application. Component List in my application: 1) Frame_A with a button 2)...
0
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.