My problem is that after breaking the KB size on a jquery POST, the sending time is mostly bigger than 1 sec.
Is there a good way to optimize that?
And why it takes so long to send, so less data?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I had a similar problem, but in PHP. The thing is when you’re sending POST requests with a lot of (or large) parameter values (larger than 1Kb if I remember correctly), HTTP tries to optimize the requests by sending “Expect: 100” header directive.
Meaning: wait for code 100 before sending the second part (those large parameters). In my case this was exactly 2 seconds. I solved this by sending the “Expect: ” header directive.
If you look in the Net tab of your FireBug, is there by and chance the an Expect parameter in the Request Header?
You can manually add the header like this (if you’re using the ajax jQuery function):
I might be completely wrong, but this sounded too familiar for me to stay silent…