Solved

hide javascript function

Posted on 2009-07-10
4
238 Views
Last Modified: 2012-05-07
How can I hide a javascript function that is embedded in an aspx page so that when a user does a view->source, then they can't see the particular javascript code. I know there isn't a way to 100% hide it, but some ways to do this are appreciated..
0
Comment
Question by:kuntilanak
4 Comments
 
LVL 7

Accepted Solution

by:
Seo_Expert earned 500 total points
ID: 24821084
Hello,

You can used javascript obfuscation or Obfuscator to scramble javascript.
You can used below url for the same :

http://www.javascriptobfuscator.com/
0
 

Author Comment

by:kuntilanak
ID: 24821446
how do I use the link above? just copy and paste the resulting obfuscated code?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24821513
Yes.

however it is not secure, it will only hide it for someone not very technical
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 24825015
You could put the code into an external file and reference it using the code below. This will hide it from the view source but if you use any plugin for developers you will be able to view the associated javascript. Ultimately the script needs to be processed by the client so it will be sent to the client and is therefore visible.

Cheers,

Lee

<script language="javascript" src="../somelocalpath/file.js"></script>

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now