Forum Moderators: open

Message Too Old, No Replies

Java Script Encoder

encode path of picture

         

yllai

2:58 am on Apr 14, 2004 (gmt 0)

10+ Year Member



Can I know what is Java Script encoder?

How to encode the path of picture in order to restrict user from copy,save, print the picture?

Where can I get these info or example?

Thanks a lot.

Rambo Tribble

3:50 am on Apr 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



JavaScript obfuscators generally just compress the code to make it harder to read. There is no iron-clad way to protect code or images on the net. You can make it harder to copy and print your images by using CSS to overlay the image you want to protect with a transparent .GIF, but a determined individual can download anything you put on the web.

yllai

3:59 am on Apr 14, 2004 (gmt 0)

10+ Year Member



How to use CSS to overlay the image that I want to protect with a transparent .gif? Can you show me the way or any tutorial that I can get it?

Thanks.

Rambo Tribble

1:23 pm on Apr 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By the way, you can get pretty much the same effect of most of the JavaScript obfuscators by just eliminating all whitespace in your code. This means you have to be religious about using semicolons to end commands, or the code won't work right after compression. You can Google to find some of the obfuscators; some are free, others charge.

The GIF trick is simple; if you have a 200x200 image named pic200x.jpg and a 200x200 transparent GIF named trans200x.gif, this is what to do:

<img src="trans200x.gif" style="background:pic200x.jpg" height="200px" width="200px" />

An attempt to click on the image to print or save will only capture the transparent GIF.