Forum Moderators: open

Message Too Old, No Replies

Hide from "Page Info" in Firefox

is there a way to keep an image URL from showing up?

         

too much information

12:07 am on Dec 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've done just about everything to keep my image URLs hidden on my page by using Flash to load them, encoding the page, etc. but the URLs still show up in the "Page Info" on Firefox and in the "Activity" window on Safari. It's my achilies heal.

So does anyone know of a way to keep a URL from showing up in those detail windows? I'm afraid that if I feed the image from another page it will just show that URL as well.

Also, I know it's an extremely small number of users that will ever find this as a way to grab images, but I want to solve the problem just to prove that it can be done.

cmarshall

1:24 am on Dec 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're probably SOL there. Firefox is all about empowering the browser. Don't forget about all the extensions you can add, like the freakin' amazing WebDeveloper [chrispederick.com] plugin.

One trick that I've often done is to display images as background images in CSS, with a 1-pixel transparent shim stretched over them to make people think they can grab the image. I even hacked < an online image gallery > to do this. The main drawback is that it can take longer to draw the image.

When push comes to shove, you'll never be able to close the "analog hole" so don't go crazy over it.

<removed inappropriate links.
See Forum Charter [webmasterworld.com]>

[edited by: tedster at 7:49 am (utc) on Dec. 22, 2006]

adamas

9:51 am on Dec 22, 2006 (gmt 0)

10+ Year Member



If somebody really wants to half-inch your images they can always just take a snapshot of the screen and trim to the required size. Even if the images are bigger than most screens there are plenty of stitching/panorama applications out there.

I'd spend my time creating more content instead.

P.S. You might not be able to stop people taking your images but are you watermarking them so that you know for certain they are yours when you come across them elsewhere?

too much information

1:23 am on Dec 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually I found a way to block copy/paste and print screen using Flash to reset the clipboard to a blank space 12 times a second along with some other stuff like using Flash to actually display the images. So my only hole is the "Page Info".

This is more of a personal project rather than a full blown necessity, so watermarking and other stuff isn't really an issue. I just want to see how overly secure I can get an image.

And doing more research I was able to come up with something in case anyone else needs to know. If you link to a PHP page as an image source then set the header ("Content-type: image/jpeg") you can control if the image is displayed only if there is a referring page and you could go further to display only if it comes from your page.

<?php
// From comments on php.net
function imageCreateFromJpegEx($file)
{
$data = file_get_contents($file);
$im = @imagecreatefromstring($data);
$i = 0;
while (!$im)
{
$data = substr_replace($data, "", -3, -2);
$im = @imagecreatefromstring($data);
}
return $im;
}

// Check to see if the image is loaded directly or not
if ($_SERVER['HTTP_REFERER']!= "") {
// Image is opened with a page so display it
header ("Content-type: image/jpeg");
$path = "http://whereever/image.jpg";
$im = imageCreateFromJpegEx($path);
imagejpeg( $im );
};
?>

The PHP page shows up as the URL of the image because that's where the browser gets the image from, but the true URL of the image isn't revealed.

You can go further and load URLs from a database or image names from the querystring while the actual image folder is not displayed.

So far it's a pretty good solution. Maybe someone could offer some upgrades?

piatkow

1:04 pm on Dec 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Resetting the clipboard? Am I missing something here? If I open your site while something is in my clipboard you are going to wipe it for me?

In the UK that would be a criminal offense under the Computer Misuse Act.

cmarshall

2:36 pm on Dec 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In the UK that would be a criminal offense under the Computer Misuse Act.

It would just be plain rude. Your site would wind up being a Daily Sucker on WPTS in about thirty seconds. The inline GD rendering isn't a bad idea. You could also do it with other technologies, such as CF, Perl and ASP.

too much information

10:48 pm on Dec 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I did have a similar solution using ASP in the past but it's been so long I couldn't find the code. For that one I basically set two server side cookies, one to identify the image and one to identify the session. If those didn't match up with what the image page already knew you didn't get an image. It was far more complicated than this PHP version, but it was effective.