Code for hiding image URLs in source code

Discussion in 'JavaScript' started by helleborine, Nov 21, 2006.

  1. #1
    Hi!

    I am looking for code that will prevent people from accessing my image URLs by viewing the source code, and typing it in the browser window.

    Normally, I would Google this, but I don't know what it's called, and I don't know which search terms will lead me to the appropriate "canned scripts."

    Thanks!
     
    helleborine, Nov 21, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    why do you want to do this? it'd just frustrate people and anyone that wanted to get the images would still be able to do it
     
    disgust, Nov 21, 2006 IP
  3. helleborine

    helleborine Well-Known Member

    Messages:
    915
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    120
    #3
    It's not for me - I am looking this up for a friend.

    We're in the same business. I used to disable right-clicking, but I don't even bother with that myself. She wants to know how to hide image URLs.

    Yes, I know. SCREENSHOT. If you really need an image, and you are not up to no good with it (yikes - double negative!), just take a screenshot.

    I don't want to argue with her, though, I just want to answer her question.
     
    helleborine, Nov 21, 2006 IP
  4. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you could encrypt it and then decrypt it while you print out lines I suppose, it'd hide it from some people. use that + right click disabling or the flickr image trick
     
    disgust, Nov 21, 2006 IP
  5. helleborine

    helleborine Well-Known Member

    Messages:
    915
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    120
    #5
    So the keywords I should search for are "javascript encryption?"
     
    helleborine, Nov 21, 2006 IP
  6. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #6
    no, it's so specific you'd have to do it yourself.

    I did something similar for a site though...

    you can use output.replace. change the urls of the image randomly in php and have them decode them via output.replace in js.
     
    disgust, Nov 21, 2006 IP
    helleborine likes this.