Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8884793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:08:57+00:00 2026-06-14T21:08:57+00:00

I know you can use a javascript obfuscator to make javascript source protected, but

  • 0

I know you can use a javascript obfuscator to make javascript source protected, but I need a better solution on top of this.

I’m investigating options to encrypt a javascript file to be placed on some websites. This javascript file is included on the page in a script tag like normal, i.e.:

<script src="http://secure.com/encryted.js"></script>

The idea is to somehow prevent users viewing the source of the javascript or at least make it much harder to do so…

I’m thinking of a way to only return the javascript by doing something like

<script src="http://secure.com/validate.php"></script>

That way I could on the host secure.com check for certain conditions and only return the javascript (encrypted) if those conditions are met.

Does anyone have an idea or done such a thing? Or knows of good way to prevent sourcecode of javascript to be exposed or make it very hard?

ETA seems a good way to encrypt it: http://www.enetplanet.com/enc/

My goal is to have people viewing the source /html not be able to "just view" the source

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:08:58+00:00Added an answer on June 14, 2026 at 9:08 pm

    No, TEA (http://www.enetplanet.com/enc/) is not the kind of tool you can use for such a task. It is just a little bit more than a proof-of-concept or than a toy. TEA (like any other encryption system) cannot be actually used to encrypt/protect a javascript file that you send to the customer’s browser.

    Consider this: the user must have a copy of the encryption program to decypher the javascript file coming from your server. In other cases, this would not be a great security hole in itself. Any encryption system rely on the secretness of a key, not on the secreteness of the encryption program/algorithm.

    Unfortunately, when talking of client-side javascript, this is a security hole. The encryption program (TEA) is a javascript file itself. Anybody can read it. It is trivial to modify it in a way that it just print out the encryption key or in a way that it just decrypt the “protected” javascript file without making any check.

    Moreover, the end-user has total, unlimited access to the network comunication channel. He can just read the password (the key) with a network sniffer installed on its PC. No key (and no encryption system) can resist such an attack (well-known as a “man-in-the-middle” attack).

    It is well known that there isn’t any real way to encrypt/protect a javascript file. The best you can do is to obfuscate it.

    If you really need to protect some kind of client-side software, you have to use compiled software (C/C++), encryption and some kind of hardware key. Any other system can easily be “cracked” (as the whole history of computer games can demonstrate).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know on client side (javascript) you can use windows.location.hash but could not find
I know you can use source control software for source code, but can you
I know you can use a javascript to do this <script type=text/javascript> touchMove =
I know I can use Request.Browser.IsMobileDevice . But does anyone know how it works,
I know that you can use a javascript: pseudo protocol for URLs in an
Just wanted to know if I can use Linq on Javascript arrays. If not
I know jQuery is easy to get the value but how can i use
Does anyone know any way that I can use javascript to check when the
you know send a ajax you can use javascript lib like: jquery $.ajax or
I want to know how I can use javascript (not jquery) to execute a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.