I've been working over a week now getting the esp8266 wifi to work as webserver. And my final conclusion is, esp8266 firmware is still not ready for primetime.
I tested a real jquery demo program that loads several css and js files simultaneously. what firefox does is, once it reads in the main html header containing the links to the other files, it starts requesting them right away, so there are now like 5 new incoming connections while the main html is still being send back. This itself is fine, but esp8266 firmware gets messed up (incoming data is completely lost) if outgoing data and incoming occur at the same time.
This is the same bug report I sent before that espressif denied and claims it is fixed.
Doing one connection at a time is handled fine by esp8266, and is probably how most people use it.
on v1.3 firmware, they added a setting for AP mode to limit the number of incoming connections, say to 1. But this option is not available in normal mode, so it is fixed to receive 5 connections. It is fine if it can handle it, but as it is now, it cannot. I'll send them an email to see if that option can be added to infrastructure mode. If that does not get anywhere, then I'll have to figure a way to work around this.