By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Prevent client image caching

P: n/a
I'm working on a litigation web app where users will review images of case
documents. One of the requirements is that we either prevent the images from
being cached on the clients machine (in temp directory or anywhere else) or
we encrypt the images somehow. I'm guessing that encryption will not work,
but is there a way to prevent caching?

Also, is there a way to prevent printing on a current page? We're already
not showing the menu or toolbar, but is there any way to disable hotkeys
(Shift+P)?

Thanks in advance,

J. Beem
May 5 '07 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On May 5, 10:02 pm, Jeff Beem <JeffB...@discussions.microsoft.com>
wrote:
I'm working on a litigation web app where users will review images of case
documents. One of the requirements is that we either prevent the images from
being cached on the clients machine (in temp directory or anywhere else) or
we encrypt the images somehow. I'm guessing that encryption will not work,
but is there a way to prevent caching?

Also, is there a way to prevent printing on a current page? We're already
not showing the menu or toolbar, but is there any way to disable hotkeys
(Shift+P)?

Thanks in advance,

J. Beem
http://.....gif?random_num would probably help

May 5 '07 #2

P: n/a
There arre HTTP Headers that can be used to prevent caching, You could also
use some css classes to hide data when a page was printed via the browsers
print function.
However,you cant stop the user from preesing the windows printscreen button
to get an image of whats on the sceen..
"Jeff Beem" <Je******@discussions.microsoft.comwrote in message
news:5C**********************************@microsof t.com...
I'm working on a litigation web app where users will review images of case
documents. One of the requirements is that we either prevent the images
from
being cached on the clients machine (in temp directory or anywhere else)
or
we encrypt the images somehow. I'm guessing that encryption will not
work,
but is there a way to prevent caching?

Also, is there a way to prevent printing on a current page? We're already
not showing the menu or toolbar, but is there any way to disable hotkeys
(Shift+P)?

Thanks in advance,

J. Beem

May 6 '07 #3

P: n/a
Yes, it will.

If you make image urls on server side, you can use Random class.

If you make them on client side, you can use (new Date()).getMilliseconds()
as a sort of a random numer generator.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
On May 5, 10:02 pm, Jeff Beem <JeffB...@discussions.microsoft.com>
wrote:
>I'm working on a litigation web app where users will review images of
case
documents. One of the requirements is that we either prevent the images
from
being cached on the clients machine (in temp directory or anywhere else)
or
we encrypt the images somehow. I'm guessing that encryption will not
work,
but is there a way to prevent caching?

Also, is there a way to prevent printing on a current page? We're
already
not showing the menu or toolbar, but is there any way to disable hotkeys
(Shift+P)?

Thanks in advance,

J. Beem

http://.....gif?random_num would probably help

May 6 '07 #4

P: n/a
Unfortunately, I have found that (at least with Internet Exploder) virtually
every combination of no-cache headers and random querystrings on the image
url still result in the image going into the Temporary Internet Files folder
immediately upon the page having completed loading.

While it may disappear later after the browser is closed, there is nothing
to stop a user from choosing Tools/Internet Options /Settings /View Files to
be able to copy this image out of the folder and save it somewhere else.

Try some combinations and let us know if I am correct in this.

Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Jeff Beem" wrote:
I'm working on a litigation web app where users will review images of case
documents. One of the requirements is that we either prevent the images from
being cached on the clients machine (in temp directory or anywhere else) or
we encrypt the images somehow. I'm guessing that encryption will not work,
but is there a way to prevent caching?

Also, is there a way to prevent printing on a current page? We're already
not showing the menu or toolbar, but is there any way to disable hotkeys
(Shift+P)?

Thanks in advance,

J. Beem
May 6 '07 #5

P: n/a
Unfortunately, I have found that (at least with Internet Exploder)
virtually
every combination of no-cache headers and random querystrings on the image
url still result in the image going into the Temporary Internet Files
folder
immediately upon the page having completed loading.
I second.
The only way out it http://someserver.com/image.jpg?{DateTime.Now.Ticks}

just to fool the browser that it's a new image...
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
May 6 '07 #6

P: n/a
Correct, but even in that case if you open the temporary files folder you can
see the image there along with the ?xxxxx querystring item from the url. The
idea here from the OP is "How to completely prevent" an image in a web page
from EVER getting into the cache folder.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"MasterGaurav (www.edujini-labs.com)" wrote:
Unfortunately, I have found that (at least with Internet Exploder)
virtually
every combination of no-cache headers and random querystrings on the image
url still result in the image going into the Temporary Internet Files
folder
immediately upon the page having completed loading.

I second.
The only way out it http://someserver.com/image.jpg?{DateTime.Now.Ticks}

just to fool the browser that it's a new image...
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
May 6 '07 #7

P: n/a
On May 6, 5:20 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Correct, but even in that case if you open the temporary files folder you can
see the image there along with the ?xxxxx querystring item from the url. The
idea here from the OP is "How to completely prevent" an image in a web page
from EVER getting into the cache folder.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"MasterGaurav (www.edujini-labs.com)" wrote:
Unfortunately, I have found that (at least with Internet Exploder)
virtually
every combination of no-cache headers and random querystrings on the image
url still result in the image going into the Temporary Internet Files
folder
immediately upon the page having completed loading.
I second.
The only way out ithttp://someserver.com/image.jpg?{DateTime.Now.Ticks}
just to fool the browser that it's a new image...
--
Happy Hacking,
Gaurav Vaish |www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
------------------------------------------ Hide quoted text -

- Show quoted text -
Jeff, sorry, I got it wrong the last time, and "?something" seems to
be a bad idea.

Maybe a Flash movie designed to show images could help?

May 6 '07 #8

P: n/a
On May 6, 5:02 am, Jeff Beem <JeffB...@discussions.microsoft.com>
wrote:
I'm working on a litigation web app where users will review images of case
documents. One of the requirements is that we either prevent the images from
being cached on the clients machine (in temp directory or anywhere else) or
we encrypt the images somehow. I'm guessing that encryption will not work,
but is there a way to prevent caching?

Also, is there a way to prevent printing on a current page? We're already
not showing the menu or toolbar, but is there any way to disable hotkeys
(Shift+P)?

Thanks in advance,

J. Beem
Is it the caching thats the problem or the fact the client can get a
copy of the image for their own use?

Tigger

May 8 '07 #9

P: n/a
Correct, but even in that case if you open the temporary files folder you
can
see the image there along with the ?xxxxx querystring item from the url.
The
idea here from the OP is "How to completely prevent" an image in a web
page
from EVER getting into the cache folder.
Peter
You can never prevent the browser's caching through "server".
I can always set the option for cache to "Never look on network" and always
work with cached image.

Yes... one option, as what Alexey suggests is to use Flash or ActiveX or for
that matter... any plug-in.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
May 8 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.