Why is my Page being Hit more than Once per View? - Web Performance

Why is my Page being Hit more than Once per View?

During testing of some sites, we found an strange case where pages seem to download themselves. What does this look like?
Recording of a page requesting itself

Note that the page gets requested, and seems to request itself while it is rendering. This has an obvious problem: the dynamic content is being requested twice as many times as necessary, causing the server to have to render it twice as often as necessary. If users turn off Load Tester’s “streaming” feature while recording, this looks a little different: the 2nd instance of the request is still made, but instead we get an error message: “Connection to server abandoned by client”.

After doing some poking around, the cause of this error seems to be triggered by the code snippet:

<image src=””>


var img = new Image();
img.src = "";

There is an excellent write up by Nicholas C. Zakas on why this happens, available on his blog at: http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/

So, when you see a page which appears to be requesting itself, look to see if you have any blank links in the source document. If you can find and eliminate them, you can quickly save yourself a significant number of unnecessary page hits & server load.

-Frank, Engineer at Web Performance

Add Your Comment

You must be logged in to post a comment.


Copyright © 2024 Web Performance, Inc.

A Durham web design company


(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
How Many Concurrent Users