ajax请求经常超时,如何解决?

发布于 2024-08-05 20:49:10 字数 37 浏览 0 评论 0原文

好像从来没有发生过这样的事情,他们是不是用了什么特殊的技术?

It seems such things never happened to SO,did they use some special technique?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

彩虹直至黑白 2024-08-12 20:49:10

这不是一个真正的问题,而是一些琐碎的建议:

  1. 让您的网站更快。
  2. 在ajax调用中加载更少的数据
  3. 利用缓存

This isn't a real question, but some trivial advice:

  1. Make your site faster.
  2. Load less data in the ajax call
  3. Make use of caching
冬天的雪花 2024-08-12 20:49:10
  1. 分析您的代码以确保它是
    快速。

  2. 检查服务器响应时间。

  3. 致力于服务的绩效。

  1. Profile your code to make sure it is
    fast.

  2. Check server response times.

  3. Work on performance of your service.

蔚蓝源自深海 2024-08-12 20:49:10

确保您使用 Firebug 超时并查看错误代码。

如果这是真的并且你真的超时了
找出服务器端发生的情况,输入 AJAX 调用服务器端的脚本,输入相同的参数,看看会发生什么,独立于 AJAX 进行调试,修复问题并编写一些测试以确保它成功不再出现
(或者如果确实如此,您就会知道问题是什么)。

Make sure you're timing out using Firebug and see the error code.

If it's true and you're really timing out
Find out what's going on the server-side, go and feed the script AJAX is calling server-side, feed it the same arguments and see what happens, debug it independently of AJAX, fix the problem and write some tests to make sure it won't come up again
(or if it does you'll know what's the problem).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文