Internet Explorer的Ajax问题(也没有错误消息) [英] Ajax issue with Internet Explorer (no error message either)

查看:108
本文介绍了Internet Explorer的Ajax问题(也没有错误消息)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个小的聊天应用程序,似乎在Mozilla Firefox,谷歌浏览器和Safari上100%工作,(在Opera中尝试过,它似乎有用,但是cookie搞砸了所有内容;这可能是因为我的安装不是在管理员帐户下运行),而是在Internet Explorer上运行。

聊天& bull;登录
http://preview.moltx.name /chat_v2/library.js


一切正常,直到你进入聊天室。 Internet Explorer只是坐着,什么都不做。甚至没有错误。它似乎能够发送数据(但不完全;使用Internet Explorer发送消息,然后检查另一个浏览器上的活动用户列表),并且对接收的数据完全没有响应。


它是用JavaScript + PHP制作的。

I have created a little chat application that seems to work 100% on Mozilla Firefox, Google Chrome, and Safari, (tried it in Opera, and it seems to work, but the cookies are screwing everything up; this is probably because my install is not being run under an administrator account), but not Internet Explorer.

Chat • Login
http://preview.moltx.name/chat_v2/library.js

Everything works fine, up until you get to the chat room itself. Internet Explorer just sits, and does nothing. Doesn''t even have an error. It seems to be able to send data (but not fully; send a message using Internet Explorer, and then check the active users list on another browser), and is completely non responsive to data received.

It''s made with JavaScript + PHP.

推荐答案

我修复了一个问题,但它并没有解决Internet Explorer正确显示的问题它收到了。


Internet Explorer在提交时发送了两条消息;一个空的,您提交的内容之一。我放了一个服务器端过滤器来防止提交空消息(因为它也会导致其他浏览器出错)所以现在从Internet Explorer提交的消息正好出现在其他浏览器上。


这与Internet Explorer有什么关系,不支持万维网联合文档对象模型吗?
I have repaired one issue but it didn''t solve the problem with Internet Explorer properly displaying what it receives.

Internet Explorer was sending two messages when submitted; one empty, one of the content you have submitted. I put a server-side filter to prevent empty messages from being submitted (since it also causes a bug with the other browsers) so now the messages submitted from Internet Explorer appear on the other browsers properly.

Does this have anything to do with Internet Explorer, not supporting the World Wide Web Consortium Document Object Model perhaps?


最可能的原因是IE正在缓存响应,所以没有进一步请求相同的URL。要禁用缓存,请添加一些标头,或使网址唯一,例如通过添加时间戳。
The most probable reason is that IE is caching the response, so no further requests to the same URL are made. To disable caching, add some headers, or make the URL unique, e.g. by adding the timestamp.


我已将以下标题添加到我的服务器对每个页面的响应中:
  • Content-Control:no-cache,必须-revalidate
  • 过期:-1
  • Pragma:no-cache
I''ve added the following headers to my server''s response for every page:
  • Content-Control: no-cache, must-revalidate
  • Expires: -1
  • Pragma: no-cache


这篇关于Internet Explorer的Ajax问题(也没有错误消息)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆