how to use image

C

CSharper

I have a situation where I have an img tag in asp page which loads the
image from server. Now I need to use the same image in couple of more
places on the same page. When the first image is loaded it is cached
in the user computer already now I would like to use the same image
cached in the client side instead of going to server couple of times
to get the image. Does any one know how to achive this in asp?
 
B

Ben Schwehn

I have a situation where I have an img tag in asp page which loads the
image from server. Now I need to use the same image in couple of more
places on the same page. When the first image is loaded it is cached in
the user computer already now I would like to use the same image cached
in the client side instead of going to server couple of times to get the
image.

if it's the same image (same url), most browsers will already do that (and
if a client's browser doesn't, there's not much you can do), why do think
this doesn't work?
 
I

Ignacio Machin ( .NET/ C# MVP )

I have a situation where I have an img tag in asp page which loads the
image from server. Now I need to use the same image in couple of more
places on the same page. When the first image is loaded it is cached
in the user computer already now I would like to use the same image
cached in the client side instead of going to server couple of times
to get the image. Does any one know how to achive this in asp?

If both images have the same URL then in almost all cases the browser
will cache it
 
C

CSharper

If both images have the same URL then in almost all cases the browser
will cache it

I have one another question. Is it possible to create an id for the
image object and then refer the id rather than passing the url of the
image in asp/html?
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top