[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

hide javascript function

Posted on 2009-07-10
4
Medium Priority
?
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 7

Accepted Solution

by:
Seo_Expert earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

649 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