Reputation: 1121
Are there any .Net components for obfuscating JavaScript? I'm generating JavaScript dynamically & emitting via ClientScript.RegisterClientScriptBlock. I'd like to make it more difficult for others to view and modify that script.
Caveats:
Thanks!
Upvotes: 5
Views: 7133
Reputation: 380
The Ajax Minifier mentioned above by Darin Dimitrov has been updated to include obfuscation as well as minification functionalities. It is also designed to work with your build and release process.
Upvotes: 1
Reputation: 1039160
You could take a look at Ajax Minifier which was recently released from Microsoft and which they use internally.
Upvotes: 0
Reputation: 41902
You can call out to Google's Closure Compiler from .NET, here's an example:
Or there's a .NET port of the YUI Compressor:
Upvotes: 6
Reputation: 921
Try to use the YUI Compressor for .Net. It does not obfuscate, but it do compress at least. You use it as a dll.
http://yuicompressor.codeplex.com/
Upvotes: 3