开发者

Ajax response empty only in Chrome 5

I have a ton of sites using a similar platform lots and lots of jQuery $.load() to pull content as text/html from php scripts. This works in all browsers and has done for a long time until Chrome 5 I have just noticed it has stopped only in that browser. So the first part of my question is - anyone know if something changed?

This is now a with/without www. issue - it's not on localhost - I suspect it may be related to the fact that the servers send the content gzipped - but this was never a problem before. I have a 2nd dev server where the content is not gzipped and it works. Anyone know any tricks to allow it to work gzipped - this is in the PHP.ini on the production server and I can't just globally turn it off.

When I look at the headers in Chrome's Dev tools I see what I would expect but the page is empty - and Chrome is showing an error in the console but there is no description with it - just empty content.

For an example here is a link: http://www.bcfirstaid.ca/calendar/ (try clicking any day in the calendar or any event listed) this will pop a dialog or lightbox and attempt to load the content viz ajax - again this works fine in everything but the newer Chrome (including other webkit browsers and mobile).

开发者_运维百科

I truly appreciate any help and/or suggestions.


Found the problem... So I'll update everyone here.

Based on past advice I had included a "Content-length" header in all my ajax responses from the server. Seems Chrome 10/11 get's bent out of shape about that and it isn't necessary anyway. Removing this header has fixed the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜