473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Prevent client image caching

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
9 6873
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Santhi | last post by:
Hi, I wish to avoid caching asp pages at the user end . Currently I have declared Response.Expires=0 at the top of my asp page. I have also used the following meta tags to prevent client side...
14
by: Ludwig77 | last post by:
I read that there are some tags that can be entered in a web page's meta tags in order to prevent web bot searching and indexing of the web page for search engines. What is the tagging that I...
10
by: Behzad | last post by:
Hi all I'am ASP programmer and I have built a site that users can upload and download files.All things store in a DB and everytime someone enters a page,the application requery the Db and shows...
2
by: gu4y | last post by:
Hello All, Is there anyway to globally prevent client browser caching in ASP.NET? Otherwise, I will have to put: Response.Cache.SetCacheability(HttpCacheability.NoCache); in every page's...
0
by: Frankie | last post by:
When I want to prevent a page from being cached, I have been using the following directive: <%@ OutputCache Location="none" %> I have also seen a few other methods recommended to prevent page...
10
by: dave Cheseldine | last post by:
Hi I want to stop a gd generated image from being cached. It is called into index.php file as follows: <image src = "http://www.daveches.co.uk/importimage/importimage.php?x=$randomNumber"...
1
by: Smokey Grindle | last post by:
is there a way to cache only Javascript and images on the client? it seems that we are spending most of our time pushing out images and java scripts, but these never change! so whats the point of...
7
by: mark4asp | last post by:
How can I prevent Caching of JavaScript and CSS files ONLY when I deploy a new application? I only want to force a refresh the first time the client uses the new build. For instance, I'm told I...
0
by: helveticus | last post by:
I have a master/details configuration that includes multiple user controls. The details page is configured to cache data via VaryByCustom. This works fine. One of the user controls contains an...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.