Is there a way to make an $.ajax POST request:
- without requiring a response
- so the server doesn't even try to return anything
Are there some HTTP headers to accomplish this? The goal would be to track statistics with minimal server and client request process开发者_运维技巧ing.
The server should return a HTTP/204 No Content response. That's as close as you can get.
If it is no problem in terms of security, and the amount of data you send is at maximum 2K minus the length of your URL, use a GET request instead. A GET request sends only one TCP packet, instead of two packets as a POST request does (first the header, then the data).
精彩评论