Ask a Question related to ASP, Design and Development.
-
Evertjan. #1
Re: caching images served by ASP
Tim Williams wrote on 28 jun 2003 in
microsoft.public.inetserver.asp.general:Random does not prevent a repeating of a value.> It is pretty common to append a querystring to an image if you're
> always using the same src and the <image> is changing, but this only
> works if the querystring contains a random parameter value.
What it needs is a nonrepeating value,
which could be simply an increasing value.
In practice a simple pseudorandom value is easier on the web,
because it precludes the storing of such value.
That this goes wrong one in say 10,000 not many complaits will come in.
Perhaps not good enoug for a banking site?
Not exactly if I read you well. The querystring is part of the url in the> - the browser looks at the whole url and
> [should] only re-fetch the image if the url changes (though
> it may always do so, depending on the client-settings).
desision whether to re-fetch or not-to-fetch. Otherwise this would go
Hamlettian wrong:
<img src="/getpicture.asp?picnr=7"><br>
<img src="/getpicture.asp?picnr=14"><br>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest
-
index.cfm deleted, but still being served
So I have an index.cfm that was deleted, yet the page is still being served. I doesn't exist at all on my server, yet I can still view it. I've even... -
loadMovie not caching images
I am experiencing problems with Internet Explorer not caching image files that I am calling wi the loadMovie function Mozilla browsers seem to... -
ASP pages not being served correctly
I have a new computer that I have iis 5 installed on win xp. I am trying to run a simple one line asp test file in my wwwroot directory. In IE 6... -
Help please... ASP is not served by IIS.
http://www.aspfaq.com/2226 http://www.aspfaq.com/2147 "Dan" <dan@netgeekster.com> wrote in message... -
ASP Caching
Hello, I have a simple web form page in which I insert/update data to a database. The SQL code to insert data is written in a server side submit... -
Evertjan. #2
Re: caching images served by ASP
Michael King wrote on 29 jun 2003 in
microsoft.public.inetserver.asp.general:I never use a DB that way, so I cannot test it.> imgs = new Array();
> imgs[0] = new Image();
> imgs[0].src = "binimage.asp?id=100"
> imgs[1] = new Image();
> imgs[1].src = "binimage.asp?id=101"
> imgs[2] = new Image();
> imgs[2].src = "binimage.asp?id=102"
> ...
>
> This time, the when the prev function assigns an image from the array
> into the IMG element, the browser re-requests the image from the
> server.
Perhaps binimage.asp introduses a noncatching header ??
[Or needs a catching header?]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest
-
Michael King #3
Re: caching images served by ASP
Dear all
Please accept my apology for this question - I have now sorted the issue out
(thanks to a TCP/IP trace).
It was due to invalid headers returned by my binimage.asp script which
prevented the browser from caching the response.
The fact the the browser still displays "downloading image ..." didn't help
!
"Michael King" <mzk_at_btopenworld.com> wrote in message
news:On3pAqkPDHA.2244@TK2MSFTNGP11.phx.gbl...user> I am not sure if I'm asking the right question, but the problem can be
> demonstrated as follows:
>
> If I use client-side JavaScript to preload static images and allow the> to browse through them, it works as expected:
>
> imgs = new Array();
> imgs[0] = new Image();
> imgs[0].src = "static0.png"
> imgs[1] = new Image();
> imgs[1].src = "static1.png"
> imgs[2] = new Image();
> imgs[2].src = "static2.png"
> ...
> function prev() {
> if (i > 0) {
> i--;
> oImg.src = imgs[i].src;
> }
> }
>
> The activation of the prev function moves an image referenced in the imgs
> array into the IMG element, without requesting the image data from the
> server.
>
> However, when I use exactly the same code, but with images read from a DB,
> it doesn't work:
>
> imgs = new Array();
> imgs[0] = new Image();
> imgs[0].src = "binimage.asp?id=100"
> imgs[1] = new Image();
> imgs[1].src = "binimage.asp?id=101"
> imgs[2] = new Image();
> imgs[2].src = "binimage.asp?id=102"
> ...
>
> This time, the when the prev function assigns an image from the array into
> the IMG element, the browser re-requests the image from the server.
>
> I have tried setting the expires and cachecontrol properties in the
> binimage.asp script, but the images still don't cache !!
>
> If anyone can confirm that this is behaviour is by design, then please put
> me out of my misery ;)
>
>
Michael King Guest



Reply With Quote

