0

I am currently developing a Javascript webapp and I want to display a list of 20 images.

In 90% of the cases this works fine.

But in 10% of the cases the first picture or the first 3-5 pictures are not loaded immediately, while the other pictures are displayed properly. The problem occurs on chrome on all devices Then - After 20 seconds they are loading properly. I tried it several times - the delay is always around 20 and 20.60 seconds

If I copy the image links and open them in a new tab (chrome), then

  • The images that had a 20 seconds delay before, again need 20 seconds to load
  • The images that have been loaded within 20 ms before, are loaded as fast as before

If I copy the link into another browser (firefox), then all images are loading fast. If I restart Chrome and paste the slow picture link, then it is loading fast.

I am hosting my app and my pictures on IONOS Webhosting. There are around 600 images in the folder where I get the images from

My code for the image is very simple:

<img v-bind:src="https://www.myhomepage.app/imagename.jpg"/ >

image of the network tab

Carsten
  • 11
  • 2

1 Answers1

0

Where is your server? - Base on your question 100% of the issue come from the network.

I also catch the problem in the past ( the server locate at US ) and when I execute testing Singapore ( the image loaded very slow )

However, the client in the US never catches the problem.

Hai Thai
  • 294
  • 2
  • 10
  • The servers are located in and around germany - where I am also sitting. This should not be the problem. The strange thing is that the 20 seconds loading delay only occurs when I load the pictures via my website first and also when access them in the same browser session directly afterwards. When I have a new browser session and I just enter the picture url directly into my browser, they are loaded within miliseconds. – Carsten Sep 12 '21 at 08:36