Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2010, 08:43 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Protect Javascript from being downloaded or encrypt it's code

Hello Friends,

Could anybody let me know how to Protect Javascript from being downloaded or encrypt it's code. Actually i'm using lot of javascript in my web application to speed up but it's code can easily be traced or downloaded so someone let me know how can i protect my javascript from either being downloaded or let me know how to encrypt it so that no one can use my js code

Last edited by Manoj Bisht; September 18th, 2010 at 08:47 AM..
 
Old September 18th, 2010, 11:34 AM
Registered User
 
Join Date: Aug 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to avrail
Default

hay,
you can use this link
http://www.iwebtool.com/html_encrypter
 
Old September 22nd, 2010, 03:18 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

FYI, these are half measures though. Javascript is a client side technology so if it isn't sent to the client... it won't run, period. No exceptions. So your visitors HAVE to be able to download it or it won't run. There are some techniques for masking the script (replacing the code with entities, etc.) but again, by definition the browser has to be able to understand it so I wouldn't call any of these techniques encryption by any stretch of the imagination. If it were truly encrypted and secure, the browser couldn't read it and the script wouldn't run. So whatever you do to mask it, it's still quite easy for someone to reverse the process in the same way the browser does in order to gain access to it. This is a JS fact of life. If you want to keep your code away from your visitors, you HAVE to do the programming server side where visitors will receive the output from the programming and not the program itself.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old September 22nd, 2010, 03:22 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

And as Joe said, years ago:

Quote:
And why is it that the people whose code is so revolutionary that it needs hiding are always the ones who don't know how to hide it :)
Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 22nd, 2010, 11:27 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

ROFLMAO! OK, what's funny is not the quote (though it's great), or the four posts before it reaming on the guy trying to implement one of the most annoying practices ever introduced.

It's the guy who shows up at the end of the thread and asks....

Quote:
hello,
i'm also looking disable view source code, please anyone help me
Dude... Seriously??? Try reading the thread before you post...
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to encrypt Javascript? Edward King Javascript How-To 6 August 11th, 2011 05:40 AM
Protect my Code tamernice Pro VB.NET 2002/2003 1 May 14th, 2005 06:43 PM
Encrypt ASP CODE Varg_88 Classic ASP Databases 4 September 11th, 2004 09:37 AM
Protect images from being downloaded speedyH Beginning PHP 2 June 16th, 2004 04:16 PM
encrypt / protect database pablens SQL Server 2000 3 October 18th, 2003 05:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.