SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict SitePointer's Avatar
    Join Date
    Oct 2001
    Location
    SitePoint
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to hide javascript?

    I want to call a javascript via a link but I want to prevent the javascript from being downloaded.

    I mean i don't use anyone to enter the javascript url in the browser and view the source.

    Is this possible?

    Can it be done by setting the javascript CHMOD permissions?

    Thanks a lot.

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, it's impossible

    If you can include the js in your html page, then everyone can download the js file
    If you change permissions, then the js file can't be included in the html page

  3. #3
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If your script is really "top secret" then use script on the server side

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML and javascript cannot be hidden from the user as it is processed on the clientside.

    the only way to hide something from a user is to process it on the server side. Explian what your trying do and i can come up with a better alternative


Bookmarks

Posting Permissions

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