Connecting Tech Pros Worldwide Help | Site Map

Cache?

  #1  
Old October 17th, 2008, 01:45 AM
Paulo
Guest
 
Posts: n/a
Hi, how do I force the asp to read the imgs files on server without making
changings on IE settings like checking: Every visit on page...?

Any hint? any classic asp code line?

Thanks!


  #2  
Old October 17th, 2008, 02:15 AM
Bob Barrows [MVP]
Guest
 
Posts: n/a

re: Cache?


Paulo wrote:
Quote:
Hi, how do I force the asp to read the imgs files on server without
making changings on IE settings like checking: Every visit on page...?
>
Any hint? any classic asp code line?
>
http://www.aspfaq.com/show.asp?id=2022

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #3  
Old October 17th, 2008, 02:45 AM
Paulo
Guest
 
Posts: n/a

re: Cache?


Many thanks Mr Barrows for the quick reply!

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcomescreveu na mensagem
news:%231VhmU$LJHA.5060@TK2MSFTNGP02.phx.gbl...
Quote:
Paulo wrote:
Quote:
>Hi, how do I force the asp to read the imgs files on server without
>making changings on IE settings like checking: Every visit on page...?
>>
>Any hint? any classic asp code line?
>>
http://www.aspfaq.com/show.asp?id=2022
>
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
>

  #4  
Old October 17th, 2008, 09:35 AM
Anthony Jones
Guest
 
Posts: n/a

re: Cache?




"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcomwrote in message
news:%231VhmU$LJHA.5060@TK2MSFTNGP02.phx.gbl...
Quote:
Paulo wrote:
Quote:
>Hi, how do I force the asp to read the imgs files on server without
>making changings on IE settings like checking: Every visit on page...?
>>
>Any hint? any classic asp code line?
>>
http://www.aspfaq.com/show.asp?id=2022
>
That article relates to the caching of responses from an ASP page. However
the question really related to the caching of the imgs which are not
normally served up by ASP. IOW this is an IIS question not a ASP one.

The images should be placed in a common folder (or set of folders in a
common root folder). In IIS manager open properties on the folder and go to
the HTTP Headers tab. Turn on expiry and set to expiry today at midnight.
Add a custom header Cache-Control: no-cache.

That will sort the problems with cached images out.

--
Anthony Jones - MVP ASP/ASP.NET

  #5  
Old October 17th, 2008, 01:25 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a

re: Cache?


Anthony Jones wrote:
Quote:
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcomwrote in message
news:%231VhmU$LJHA.5060@TK2MSFTNGP02.phx.gbl...
Quote:
>Paulo wrote:
Quote:
>>Hi, how do I force the asp to read the imgs files on server without
>>making changings on IE settings like checking: Every visit on
>>page...? Any hint? any classic asp code line?
>>>
>http://www.aspfaq.com/show.asp?id=2022
>>
>
That article relates to the caching of responses from an ASP page. However
the question really related to the caching of the imgs which
are not normally served up by ASP. IOW this is an IIS question not a
ASP one.
The images should be placed in a common folder (or set of folders in a
common root folder). In IIS manager open properties on the folder
and go to the HTTP Headers tab. Turn on expiry and set to expiry
today at midnight. Add a custom header Cache-Control: no-cache.
>
That will sort the problems with cached images out.
My bad - I thought the article covered that. I should have reread it before
posting it.


--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #6  
Old October 17th, 2008, 03:05 PM
Evertjan.
Guest
 
Posts: n/a

re: Cache?


Anthony Jones wrote on 17 okt 2008 in
microsoft.public.inetserver.asp.general:
Quote:
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcomwrote in message
news:%231VhmU$LJHA.5060@TK2MSFTNGP02.phx.gbl...
Quote:
>Paulo wrote:
Quote:
>>Hi, how do I force the asp to read the imgs files on server without
>>making changings on IE settings like checking: Every visit on
>>page...?
>>>
>>Any hint? any classic asp code line?
>>>
>http://www.aspfaq.com/show.asp?id=2022
>>
>
That article relates to the caching of responses from an ASP page.
However the question really related to the caching of the imgs which
are not normally served up by ASP. IOW this is an IIS question not a
ASP one.
>
The images should be placed in a common folder (or set of folders in a
common root folder). In IIS manager open properties on the folder and
go to the HTTP Headers tab. Turn on expiry and set to expiry today at
midnight. Add a custom header Cache-Control: no-cache.
>
That will sort the problems with cached images out.
Indeed "normally".
But for the "admormal" that have no access to the IIS internals.

To accomodate the latter the images could be called by the client from an
nonexisting directory, and on arrival at 404.asp detected and streamed to
the client after setting headers as in
<http://classicasp.aspfaq.com/general...sp-pages-from-
caching.html>


Perhaps even a
server.transfer "/realdir/myImage.jpg"
is possible, but I never tested that.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #7  
Old October 17th, 2008, 10:45 PM
news.alltel.net
Guest
 
Posts: n/a

re: Cache?


I don't have my code handy, but what I've done in the past is put a random
number after the image so it's unique.

<img src="\images\theImage.jpg?id=<%= random number here %>">

Then the browser thinks it's a different image and won't pull it from the
cache.

Ron

"Evertjan." <exjxw.hannivoort@interxnl.netwrote in message
news:Xns9B3AA35BD924Deejj99@194.109.133.242...
Quote:
Anthony Jones wrote on 17 okt 2008 in
microsoft.public.inetserver.asp.general:
>
Quote:
>"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcomwrote in message
>news:%231VhmU$LJHA.5060@TK2MSFTNGP02.phx.gbl...
Quote:
>>Paulo wrote:
>>>Hi, how do I force the asp to read the imgs files on server without
>>>making changings on IE settings like checking: Every visit on
>>>page...?
>>>>
>>>Any hint? any classic asp code line?
>>>>
>>http://www.aspfaq.com/show.asp?id=2022
>>>
>>
>That article relates to the caching of responses from an ASP page.
>However the question really related to the caching of the imgs which
>are not normally served up by ASP. IOW this is an IIS question not a
>ASP one.
>>
>The images should be placed in a common folder (or set of folders in a
>common root folder). In IIS manager open properties on the folder and
>go to the HTTP Headers tab. Turn on expiry and set to expiry today at
>midnight. Add a custom header Cache-Control: no-cache.
>>
>That will sort the problems with cached images out.
>
Indeed "normally".
But for the "admormal" that have no access to the IIS internals.
>
To accomodate the latter the images could be called by the client from an
nonexisting directory, and on arrival at 404.asp detected and streamed to
the client after setting headers as in
<http://classicasp.aspfaq.com/general...sp-pages-from-
caching.html>
>
>
Perhaps even a
server.transfer "/realdir/myImage.jpg"
is possible, but I never tested that.
>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #8  
Old October 18th, 2008, 12:15 AM
Evertjan.
Guest
 
Posts: n/a

re: Cache?


news.alltel.net wrote on 17 okt 2008 in
microsoft.public.inetserver.asp.general:
Quote:
>
"Evertjan." <exjxw.hannivoort@interxnl.netwrote in message
news:Xns9B3AA35BD924Deejj99@194.109.133.242...
Quote:
>Anthony Jones wrote on 17 okt 2008 in
[......]
Quote:
Quote:
Quote:
>>>
>>That article relates to the caching of responses from an ASP page.
>>However the question really related to the caching of the imgs which
>>are not normally served up by ASP. IOW this is an IIS question not
>>a ASP one.
>>>
>>The images should be placed in a common folder (or set of folders in
>>a common root folder). In IIS manager open properties on the folder
>>and go to the HTTP Headers tab. Turn on expiry and set to expiry
>>today at midnight. Add a custom header Cache-Control: no-cache.
>>>
>>That will sort the problems with cached images out.
>>
>Indeed "normally".
>But for the "admormal" that have no access to the IIS internals.
>>
>To accomodate the latter the images could be called by the client
>from an nonexisting directory, and on arrival at 404.asp detected and
>streamed to the client after setting headers as in
><http://classicasp.aspfaq.com/general...y-asp-pages-fr
>om- caching.html>
>>
>>
>Perhaps even a
>server.transfer "/realdir/myImage.jpg"
>is possible, but I never tested that.
[Please do not toppost on usenet and do not quote signatures]
Quote:
I don't have my code handy, but what I've done in the past is put a
random number after the image so it's unique.
>
<img src="\images\theImage.jpg?id=<%= random number here %>">
>
Then the browser thinks it's a different image and won't pull it from
the cache.
That is a not so nice [but useful] way, as you will fill up the browser
cashe with lot's of versions of the same image.

Anyway you do not need a random number, use the number of miliseconds
since a fixed point in time. That is unique as it is nonrepeating.

ASP Jscript:

src="\images\theImage.jpg?id=<% = new Date() %>"




--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
The type initializer MS.AB.Cache threw an exception. =?Utf-8?B?YmlqYXk=?= answers 0 February 8th, 2007 03:15 PM
Data Cache Question Stan SR answers 5 October 27th, 2006 02:05 PM
Building client on 2005 - Microsoft.ApplicationBlocks.Cache mateipuiu@yahoo.com answers 0 June 23rd, 2006 02:35 PM
Cache feature doesn't produce expected result (bug?) Tom.PesterDELETETHISSS@pandora.be answers 14 November 19th, 2005 05:15 PM
Cache dataset and expire martin answers 3 November 17th, 2005 09:58 PM