I am having a problem with the initial page load of a site after refresh. I use Chrome for development but the problem is evident across all browsers.
I get the message "Waiting for mysite.com..." and the loading indicator keeps spinning. This stays like this for about 10 seconds and then Chrome gives up and tells me "Unable to load resource 'foobah.png'" from within the developer console. The image is definitely at the path stated. Sometimes it loads sometimes it doesn't. If I remove reference to this image altogether the error will fall on a different image within the page. This is a regular but intermittent fault.
My site is javascript heavy (2500+ lines) I suspect it could be something to do with either:
Does anyone have any experience of this type of page load problem?
Appreciate any help you can give!
Example URL: http://dev.thebeer.co/imgs/UI/inboxIcon.png
Chrome Developer Tools Screens:
UPDATE:
This is an example screenshot from firebug. You can see that the request for the resource doesn't time out but takes ages to retrieve. The file that fails can vary from CSS background-image to normal image to even a font file. I think this problem is deeper than client side. We have also been experiencing The Chrome "The following pages have become unresponsive. Your can wait for them to become responsive or kill them" error occasionally. We have stripped the page of ALL javascript, it's almost a bare shell! The image load problems continue to occur cross browser.
UPDATE:
I have found that the following errors in http error log seem to be linked with the problem. Anyone know what they mean and how to solve them?
[ Wed Feb 23 06:54:17 2011] [debug] proxy_util.c(1854): proxy: grabbed scoreboard slot 0 in child 5871 for worker proxy:reverse
[Wed Feb 23 06:54:17 2011] [debug] proxy_util.c(1967): proxy: initialized single connection worker 0 in child 5871 for (*)
[Wed Feb 23 06:54:24 2011] [debug] proxy_util.c(1854): proxy: grabbed scoreboard slot 0 in child 5872 for worker proxy:reverse
[Wed Feb 23 06:54:24 2011] [debug] proxy_util.c(1873): proxy: worker proxy:reverse already initialized
[Wed Feb 23 06:54:24 2011] [debug] proxy_util.c(1967): proxy: initialized single connection worker 0 in child 5872 for (*)
[Wed Feb 23 06:59:15 2011] [debug] proxy_util.c(1854): proxy: grabbed scoreboard slot 0 in child 5954 for worker proxy:reverse
[Wed Feb 23 06:59:15 2011] [debug] proxy_util.c(1873): proxy: worker proxy:reverse already initialized
Sounds like it is quite a heavy site (2500+ lines of js!). It is strange that you only experience it on Chrome but this may just be down to the way it handles requests.
As your static content is so heavy, I would recommend using a content delivery network (CDN). Spreading your content across a CDN (and geographical locations) allows a user to be served by the closest,and therefore fastest, server.
There are many CDN providers who will charge to host your content. I use Amazon S3 storage facility, and while not a true CDN, helps me spread my static content which does speed up my sites.
Also with Amazon S3, you can specify your geographical location of your storage area, whether it be US or Europe etc. This geographical location may be closer than your existing web server which is a bonus. S3 gives you free membership as well to test it out.
Hope this helps.
Chris.
If it were Chrome-specific, I'd say it might have something to do with this known bug, but since you mentioned it's happening in other browsers, are you getting the same errors from Firebug, Safari's web developer tool, and/or IE's developer tool?
Also, what's the total download time and amount of your page? I see in your images that there appear to be a large number of files, and some of the images are taking several seconds to load. Can any of those be optimized?
One way to help remedy the problem as a whole is to create sprites, or use non-image alternatives wherever possible (you can use a number of CSS3 techniques to replace things like gradients and whatnot), as well as using tools like SmushIt for images and a JS minifier and combiner to decrease your file sizes and server requests.
Finally I get someone with this problem with me:
chrome classic - "failed to load resources"
This problem drives developer crazy as it can happen locally, with small amount of requests and a tiny PNG -- however, if you open the image in a new tab, your image will be....finely loaded!
Important notice: chrome caching is the most tricky one I experienced - try to disable/bypass the caching of chrome by using the privacy mode or append a random string behind the resources
Important notice 2: sometime the network tab of web inspector will make a connection time out - that's why you see the "PENDING" state
Solutions/workarounds I tried:
By some formatting (css selector, css rule order and line breaking), with some trial and error, the image loaded again. (this one works magically)
I wonder if a specific bit of the origin image jammed the image renderer (as data-uri is not work at the beginning)...but this problem will appear when some CSS style applied for a PNG-backgrounded block - especially when "opacity" involved (or that PNG is a hidden background)
Summary:
*You may not believe after I edited the image, the problem appear / disappear.
(If you experiencing long wait time for other images cross browser, it most likely is the performance issue but may be not the bug - some blocking occured)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With