views:

43

answers:

1

I have a page that includes a dynamic js-script depending on the page I'm visiting. However, I'm getting errors in my log from some IE8-visitors, where it seems like the actual request-url is completely mangled for the mentioned script.

This is what it should fetch:

<script type="text/javascript" src="?partial=filterjs&json=true&viewall"></script>

which translates to /sv/5/outlet?partial=filterjs&json=true&viewall

However, looking in my logs, I see stuff like:

/sv/5/outlet?partial=filterjs&json=truepor</a></li></ul></h2></li><li%20class=
/sv/7/jackor?partial=filteent/view/teams

It seems to truncate the url, and append random stuff from the actual markup that comes later on (way later on, in fact, although approx at the same offset)

I first thought it had something to do with the new XSS-filter that IE8 implemented, but tried disabling it using the HTTP-header

X-XSS-Protection: 0

Without success.

I cannot reproduce this error on my own machine either, however this happens several times a day (on a site with approx 3000 visits per day). This is happening on both XP, Vista and Win7 according to the user-agent (NT 5.1, 6.0 and 6.1).

Anyone recognize this behaviour?

+5  A: 

Yes, this is a known bug in the lookahead downloader in Internet Explorer, where it drops a 4k part of the page when doing lookahead downloads.

This sometimes means that an URL for a resource in the page is cut and combined with some other text later in the page, resulting in a bad URL being requested.

The lookahead downloader is only used to try to fill the cache beforehand, when the resource is actually needed in the page it will be requested with the correct URL, so the user doesn't experience any errors in the page because of this.

Guffa
Ah, this sounds very reasonable since when looking into the source and checking the amount of code that is actually dropped it is in 80% of the cases exactly 4119 bytes (in UTF-8), or 3890 chars. I'm guessing my cut and pasting between programs modifies the length a bit, therefor it isn't exactly 4096 bytes. Great answer! I will safely assume that this doesn't bother users.
jishi