The F12 view request returns 304, and the Python requests always returns the result 200.

F12 View Network headers is shown as follows:
Request Method: GET
Status Code: 304Not Modified

but the status_code obtained through the get method of the Python requests library has always been 200.

what is the reason for this?

May.22,2021

do you think the request headers of the next two requests are the same?
take a look at the request headers in the browser. 304 will have: If-Modified-Since and If-None-Match (caching mechanism). Then only cache can be used in Chrome debug mode, and you can try refreshing the request again

Menu