Forcing a browser to not save as a cookie

liunx

Guest
Is it possible to tell any browser to not save an image as a cookie?<br />
<br />
The way my new counter works, is that it loads the image from the server, using the same image link, so the computer just loads the image from cookies, which doesn't help becuase the counter doesn't increase (picture wise, technically it does, but you can't see it).<br />
<br />
Thanks!<!--content-->This question was almost off the first page as soon as I posted it since, very strangly, about 13 people posted just after me. With only 10 views so far, most probably mine, I have decided to reply back, to hopefully get some help :)<!--content-->Maybe I wasn't the only one who didn't know what you meant. Images aren't stored in cookies. Maybe you meant your temp directory? Anyway, try this out:<br />
<br />
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> <br />
<meta http-equiv="pragma" content="nocache"><!--content-->Oh, sorry :( it is the temp folder-<br />
<br />
is there a code just to prevent a certain image from loading? Cause, it would be nice to have all the other images load<!--content-->Here's what I would try (not sure if it will work).<br />
<br />
Append a dynamic query string to your image, either using serverside code (best) or javascript. This should (in theory) cause the image to reload everytime. Something like this (but a dynamic query string, of course):<br />
<br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"yourimage.gif?1032918"><!--content-->Well, thanks for the help, but I couldn't get it to work- problem is, with the counter, it loads a page and not really an image- I mean, sure it loads an image, but I have to link to a page (which isn't an image, so the code didn't quite work)<br />
<br />
whew, if you can understand that, lol :rolleyes:<!--content-->And what I'm saying is to use some code like this:<br />
<br />
.php<br />
<?PHP<br />
$num = rand (0,1000000);<br />
echo "<img src=http://www.webdeveloper.com/forum/archive/index.php/\"yourimage.gif?$num\">";<br />
?><br />
<br />
Which will dynamically change the query sting every time you load the page (if you also use the no-cache code I gave you)<!--content-->Does it work with just pages (see above)<br />
<br />
My counter link:<br />
<br />
<!-- m --><a class="postlink" href="http://counter.digits.com/wc/-d/4/-f/BBBBBB/BarbWire">http://counter.digits.com/wc/-d/4/-f/BBBBBB/BarbWire</a><!-- m --><br />
<br />
<!-- m --><a class="postlink" href="http://counter.digits.com/wc/-d/4/-f/BBBBBB/BarbWire">http://counter.digits.com/wc/-d/4/-f/BBBBBB/BarbWire</a><!-- m --><!--content-->I don't think I understand what you are asking...<!--content-->Ok, I'll try this :D :<br />
<br />
I have a counter on my website that links to another website (you know, a free counter)<br />
<br />
Now, I'm having a problem with the counter becuase evertime I view my website, the counter number does not increase.<br />
<br />
On the site that hosts my counter, they say that happens becuase their counters load images to increase the numbers<br />
<br />
But in doing so, the image is saved in your TEMP folder/ cache, whatever, so the counter appears to not be increasing.<br />
<br />
Now, as soon as the image in the TEMP folder is deleted, then the counter will load normally, but then be stored in TEMP again, and go through the same problems.<br />
<br />
So, I was wondering if their was a way to force a browser to not store the link in your TEMP/cache folder-<br />
<br />
The only hard part, which I think is where I might confuse people, is that the link I must put on my website to view the counter, does not link to an image- it links to an actual webpage, so theoretically, I want to force a browser to not store the webpage in your TEMP/cache folder.<br />
<br />
<br />
<br />
There, I hope that helps, lol :D<!--content-->As I said earlier, to disable the catching of a page, you will need to use something like this:<br />
<br />
<meta http-equiv="cache-control" content="no-cache, must-revalidate"> <br />
<meta http-equiv="pragma" content="nocache"><!--content-->But, I can't change the code for the page- the page I want to not have loaded is on some other free sever (not mine) so, I can't change the HTML coding :(<!--content-->
 
Back
Top