jsonp comet hanging request causes ugly “loading” status on browsers

前端 未结 2 1280
-上瘾入骨i
-上瘾入骨i 2021-01-03 15:34

I\'m using jsonp to do cross-domain comet requests, and the \"loading\" status is really annoying.

Is there any way to suppress this with javascript?

For tho

2条回答
  •  旧巷少年郎
    2021-01-03 16:10

    If you begin your first request after the page has finished loading, you should be able to avoid the loading indicator.

    $(function () {
        setTimeout(function () {
            $.jsonp(...)
        }, 1000);
    });
    

提交回复
热议问题