Forum Moderators: open

Message Too Old, No Replies

stop loading images in a page

         

sasidhar1229

9:18 am on Dec 19, 2008 (gmt 0)

10+ Year Member



Hi everybody,
This is my requirement.
In html page I have some image tags with some src. I have to read each of those src for every image tag and replace with new srcs.

Here whenever it reaches image tag in the page it starting to load the image from that src.

The original srcs are in one server and new srcs are in another server.
Here it is displaying first image and then it is replacing that image with new image.I don't want to display original image.

So here two requests are going for two servers. It takes some time to display first one and some time to second image which is required.

We don't want to display original src's image.
If we don't mention src at all we don't get this problem.But it is required. By using that one only we are going to get new src.
How can we stop first request means when it reaches image tag it should not get that image from that original src.

We are very much interested on new srcs which are fetched from another server.

How can we stop image tag to load src when it reaches that image tag.

Greven

3:34 pm on Dec 19, 2008 (gmt 0)

10+ Year Member



First, I'd ask why not just load them to begin with? If you don't specify the source until you're ready to load the new images, you should be fine, but you can't do this? Why not? If you don't want to show the images, you could set the CSS visibility to hidden by default, and then change them all to visible when the new ones load. That way they browser will render the images in place but not visible so you won't get page flicker.

sasidhar1229

5:55 am on Dec 21, 2008 (gmt 0)

10+ Year Member



Yes, your correct. But when we do that it process two requests. Here I will first get the original source in one server and I have to check this sources corresponding image in another server and if it is there then get that source from second server and display that second image.
If it is not there display first one.

If I make visibility value to none it will get first source image and as well as second image from two different servers.

only one request should process either from first or second server.