The company I used to work with was a b2b portal. Their Chinese customers were having issue to submit form due to the firewall and was taking 22 seconds. What I simply did was sending close header from server which made client browser to shut the request and release. Behind the scene it was still taking same time but at least customer weren't waiting. It was kind of Ajax but using apache flags.