jczic / MicroWebSrv

A micro HTTP Web server that supports WebSockets, html/python language templating and routing handlers, for MicroPython (used on Pycom modules & ESP32)
https://github.com/jczic/MicroWebSrv
MIT License
641 stars 116 forks source link

Chrome not load all files ? #8

Closed straga closed 6 years ago

straga commented 6 years ago

Why Chrome, Opera not loading all files (index.html. style.css, bootstrap.css, jquery.js, app.js). Every F5 load only some files?

FireFox works.

jczic commented 6 years ago

Hi, It's possible if MicroWebSrv process in no multi-thread mode. Do you have try with multi-thread to True ?

straga commented 6 years ago

It ESP8266.

jczic commented 6 years ago

But it can accept one connection at the same time if it's not in multi-threading mode.

straga commented 6 years ago

ESP8266 not support _thread, or you meaning something also ?

jczic commented 6 years ago

I've never tested it on esp8266 but it works fine on ESP32 and Pycom modules. It's strange that don't loads all files on your chrome but threads config is maybe the problem ?

straga commented 6 years ago

hm ESP8266 not have threads. Need write other Http server for ESP8266.

straga commented 6 years ago

I try write webserver for ESP8266 with timer without bloking. Runner run every 100ms for check connect. Load file by file. https://www.youtube.com/edit?video_id=VdtNRpn-UfA