-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WebServer #2020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, the attached Sketch will demonstrate the issue. You will need to upload the data folder to the SPIFFS and then connect to the SSID "Hello" and browse to 192.168.4.1. If you then look at the output and the developer console in Chrome you'll see the failure to download jquery... Martin |
The chip being used is the ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash. |
I suspect this may be the same issue as #1921 . Likely the browser requests the .js file, while index.html is still loading. That will currently not work. You could try moving the <script>-tag all the way to the end of index.html (it's allowed anywhere in HTML), perhaps that will defer the loading long enough. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This stale issue has been automatically closed. Thank you for your contributions. |
Hello @MartinDavidWaller . |
Ping |
Closing as solved, if you still face the issue, please reopen it. Thanks for understanding. |
Hi,
I've recently moved some code from the NodeMCU environment to the ESP32 environment and I've found something very odd with the WebServer code. I've refreshed my sources from today and it still fails.
I have an index.html file stored in SPIFFS that contains the header:
The server code makes use of the standard pattern:
and the handlerFileRead method starts with:
bool handleFileRead(String path) {
// A request has come in for a file, we can process that here.
Serial.println("");
Serial.println("File requested:" + path);
This all seems to work fine, the index.html file is served as expected and the styles.css file is severed as expected. The jquery-3.2.1.min.js request is never server when requested via the index.html page? Seemingly the request never gets as far as the handlerFileRead method.
However, if I request the jquery-3.2.1.min.js file directly then it works.
It's almost as if it can't handle all the requests from the index.html page. Using Chrome to try and debug this I can see the request going out correctly from index.html but Chrome shows no response?
I wonder if anyone else has similar issues. This worked fine on the NodeMCU device.
Any help / guidance much appreciated.
Martin
The text was updated successfully, but these errors were encountered: