Search found 3 matches
- Thu Jul 18, 2019 4:01 pm
- Forum: General Discussion
- Topic: Proper way of choosing which file to serve on web server
- Replies: 0
- Views: 1854
Proper way of choosing which file to serve on web server
I want my ESP32 to serve local SPIFFS file, when it's not connected to my router or internet, in general. Then, when there's an internet connection, I want it to serve files from CDN. Is this the right way of doing so? It doesn't work for me. // Bootstrap CSS server.on("/bootstrap.min.css", HTTP_GET...
- Sun Jul 14, 2019 10:39 am
- Forum: General Discussion
- Topic: GZIP 'data' contents before uploading to SPIFFS partition with platformio
- Replies: 0
- Views: 2212
GZIP 'data' contents before uploading to SPIFFS partition with platformio
I found that it's possible to compress HTML, CSS, JS files from 'data' folder before uploading its contents to the board with platformio. To do that, one should create extra_script.py at the same level as platformio.ini and put some code in it. # custom action before building SPIFFS image. For examp...
- Sun Jul 14, 2019 10:31 am
- Forum: General Discussion
- Topic: [Question] Serving GZIPped content from SPIFFS
- Replies: 1
- Views: 7602
[Question] Serving GZIPped content from SPIFFS
I want to serve several files from ESP32 async web server in compressed format. For example, my 'data' folder has two files: 1. favicon.ico 2. index.html I compress index.html to index.html.gz. With this code, .gz archive is opening in a browser as plain text, showing a couple lines of jibberish: se...