服务器下的程序会进行一次网络请求。请教怎么解决卡的有关问题

WBOY
Release: 2016-06-13 13:16:34
Original
930 people have browsed it

服务器上的程序会进行一次网络请求。请问如何解决卡的问题?
现在服务器上会进行一次网络请求。这个请求是用ajax发出的。但这个时候服务器就卡住了。只有等这个请求完了才能请求其它页面。这个时候如果请求没有完成。其它页面就卡在那里。请问有何良方?

------解决方案--------------------
你的标题把我弄糊涂了。服务器上的程序进行一次网络请求? 是浏览器端发起的请求?还是说服务器端程序发起的请求?哪里来的ajax
------解决方案--------------------
服务器发出一个请求? get 其他服务器的数据?
------解决方案--------------------
这个不是什么服务器卡住了,是浏览器的原因
这个是w3school(http://w3school.com.cn/jquery/ajax_ajax.asp)上jquery ajax的介绍

async
类型:Boolean
默认值: true。默认设置下,所有请求均为异步请求。如果需要发送同步请求,请将此选项设置为 false。
注意,同步请求将锁住浏览器,用户其它操作必须等待请求完成才可以执行。
------解决方案--------------------
楼上回答不错,就是同步或异步的问题,改一下试试

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!