[webkit-qt] 答复: how to get information when all the ajax requests are responsed

Chen Zhixiang chenzx at cn.fujitsu.com
Sun Nov 3 23:26:03 PST 2013


You can debug this by print out the request URL to see which url cause this
problem.

 

发件人: Frank [mailto:qq371811291 at 126.com] 
发送时间: 2013年11月4日 15:05
收件人: 'Chen Zhixiang'; webkit-qt at lists.webkit.org
主题: 答复: [webkit-qt] how to get information when all the ajax requests
are responsed

 

Well, thank you for your reply. But I cannot control the process of ajax
because it is triggered by an action on the web page. Im trying to count the
request and response to know which is the last response via subclass
QNetworkAccessManager now. I implement the createRequest and receiveResponse
methods but responses I received are always less than requests I sent.
receiveError also be implements but it still not work. How to solve this
problem? Thx!

 

发件人: Chen Zhixiang [mailto:chenzx at cn.fujitsu.com] 
发送时间: 2013年11月4日 13:38
收件人: 'Frank'; webkit-qt at lists.webkit.org
主题: 答复: [webkit-qt] how to get information when all the ajax requests
are responsed

 

The Ajax requests may be after the loadFinished() event.

You can NOT reliably check this.

 

Consider the extreme example: //using jQuery

 

$(document).ready( function(){

setTimeout(function(){ doAjaxLoad();}, 500000);

});

 

But normally, you may subclass QNetworkRequest, to watch: if there is no
more active/pending requests, then page load is done!

 

发件人: webkit-qt-bounces at lists.webkit.org
[mailto:webkit-qt-bounces at lists.webkit.org] 代表 Frank
发送时间: 2013年11月4日 7:39
收件人: webkit-qt at lists.webkit.org
主题: [webkit-qt] how to get information when all the ajax requests are
responsed

 

Hi all: 

I have a question. After a web page has been loaded, the webpage is dragged
to the end of the page to invoke serials of ajax request. The Ajax requests
may change the content of the page. How can I be informed when all the
requests have been responsed?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20131104/5f43f68c/attachment.html>


More information about the webkit-qt mailing list