www.webdeveloper.com
Results 1 to 5 of 5

Thread: Hiding javascript code

  1. #1
    Join Date
    May 2006
    Posts
    115

    Hiding javascript code

    Hi,

    is it possible to keep the javascript code from being seen by both 1) the users (using the web browsers) and more interestingly 2) the administrators (the server side)?

    Actually this is more of a question for all types of scripting including php and javascript. I ask because I dont know of a way and considering that the code is in text format I dont know if it can be hidden of encrypted.

    I'd appreciate it if someone knew a way to possibly do this.

    Thanks.

  2. #2
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132

  3. #3
    Join Date
    Jul 2004
    Location
    West Coast, Canada
    Posts
    665
    Quote Originally Posted by arzoo
    Hi,

    is it possible to keep the javascript code from being seen by both 1) the users (using the web browsers) and more interestingly 2) the administrators (the server side)?

    Actually this is more of a question for all types of scripting including php and javascript. I ask because I dont know of a way and considering that the code is in text format I dont know if it can be hidden of encrypted.

    I'd appreciate it if someone knew a way to possibly do this.

    Thanks.
    http://www.developertutorials.com/t...0419/page1.html

    You won't be able to view the JS file, but if your browser caches all files that it downloads...then they can just look into their temp files and read your javascript file from there.

    It'll stop most people from viewing your js source at least.

    As for hiding it from administrators that can download your PHP files, then the answer is no. For regular users, yes.

  4. #4
    Join Date
    Jul 2006
    Posts
    72
    You can't stop people looking at the source code, but you can make the source code hard to understand.

    I've got a javascript compressor that reduces the size of the script and in the process makes the code a lot harder to follow.

  5. #5
    Join Date
    Jul 2004
    Location
    West Coast, Canada
    Posts
    665
    Quote Originally Posted by ProggerPete
    You can't stop people looking at the source code, but you can make the source code hard to understand.

    I've got a javascript compressor that reduces the size of the script and in the process makes the code a lot harder to follow.
    Impressive tool! I like, I like!! Excellent post!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles