jeudi 29 juin 2017

web.py: static files load slow & ajax post in pending state: provisional headers are shown.

I use web.py as my sever. I encountered a problem , if i refresh the page using 'ctrl+F5' for severl times(disable cache), the css & js static files will load so slow. What's more, the request will result in

Request Headers
Provisional headers are shown
Referer:http://10.1.1.56:8081/
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36

Many posts will be in a pending state, the page will become really solw. After long time, the page will be ready(almost 8 minutes). The chrome://net-internals events shows in the following.

t= 0 [st= 0] +REQUEST_ALIVE [dt=30144]
--> has_upload = false
--> is_pending = true
--> load_flags = 33026 (BYPASS_CACHE | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
--> load_state = 15 (WAITING_FOR_RESPONSE)
--> method = "GET"
--> net_error = -1 (ERR_IO_PENDING)
--> status = "IO_PENDING"
--> url = "http://ift.tt/2u1Yfq8"
t=30143 [st=30143] -HTTP_STREAM_PARSER_READ_HEADERS
t=30143 [st=30143] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 200
ETag: "1498156243.54"
Content-type: application/javascript
Content-Length: 3081
Last-Modified: Thu, 22 Jun 2017 18:30:43 GMT
Date: Wed, 28 Jun 2017 22:58:20 GMT
Server: localhost
t=30143 [st=30143] -HTTP_TRANSACTION_READ_HEADERS
t=30143 [st=30143] HTTP_CACHE_WRITE_INFO [dt=1]
t=30144 [st=30144] HTTP_CACHE_WRITE_DATA [dt=0]
t=30144 [st=30144] HTTP_CACHE_WRITE_INFO [dt=0]
t=30144 [st=30144] URL_REQUEST_DELEGATE [dt=0]
t=30144 [st=30144] -URL_REQUEST_START_JOB
t=30144 [st=30144] URL_REQUEST_DELEGATE [dt=0]
t=30144 [st=30144] HTTP_TRANSACTION_READ_BODY [dt=0]
t=30144 [st=30144] HTTP_CACHE_WRITE_DATA [dt=0]
t=30144 [st=30144] URL_REQUEST_JOB_FILTERED_BYTES_READ
--> byte_count = 2920
t=30144 [st=30144] HTTP_TRANSACTION_READ_BODY [dt=0]
t=30144 [st=30144] HTTP_CACHE_WRITE_DATA [dt=0]
t=30144 [st=30144] URL_REQUEST_JOB_FILTERED_BYTES_READ
--> byte_count = 161
t=30144 [st=30144] HTTP_TRANSACTION_READ_BODY [dt=0]
t=30144 [st=30144] HTTP_CACHE_WRITE_DATA [dt=0]
t=30144 [st=30144] -REQUEST_ALIVE

What's wrong with web.py?

I have tried different computers. Some even cannot send the ajax post. All the posts were in a pending state. And it shows in F12: provisional headers are shown.




Aucun commentaire:

Enregistrer un commentaire