A Data URLs example which shows how to download client side content as a file.
This subproject defines a simple web page that illustrates the Data URLs feature. Data URLs encode content in a URL which conveniently lets the user download a file containing that content. No server interaction or separate page is necessary!
- Run a local web server:
-
python3 -m http.server --directory src/
-
- Open the browser
- Open the browser and navigate to http://localhost:8000
- Download the file!