开发者

IE8 corrupting the script src?

开发者 https://www.devze.com 2022-12-23 05:22 出处:网络
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 comple

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 ap开发者_StackOverflowprox 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号