Static images on a subdomain only show up sporadically or after reload
I hope you can help me out here.
On our webspace I have a directory structure like the following. I have changed all the names for simplicity reasons.
root root/website1 root/website2 root/images
The websits are available under two different domains: www.website1.com and www.website2.de.
The images in root/images are shared by both websites. For that reason I have a (sub-)domain images.anotherwebsite.net pointing to root/images. I also thought that loading the images from another domain would give me some speed increase in the loading times.
Now I have the problem that sporadically the images that are located on the subdomain do not show up. Using Firebug to check the network activity I can see that the images are not being loaded. Checking the source code after loading the page (with images not showing up) I can see that the source code looks ok - showing something like this:
<img src="http://images.anotherwebsite.net/testimage.jpg" border="0" width="100" height="100" alt="Test" />
So, if the source code looks like this then why does the browser not show the images?
On reload the images always show up.
I have tried this on Chrome, Firefox, IE. Same problem.
Any help would be appreciated.
Thanks a lot
I believe that browsers that display images from a different domain actually make another connection to the webserver to try and retrieve the images while the page loads.. Maybe the web server wont accept multiple connections from the same connection at the same time? This would probably give you the same type of symptoms as you are describing. Check for any connection limits like that on the web server.