Dynamic Resources
Learn how to create and serve dynamic resources.
We'll cover the following
Static resources and their limitations
Previously, we looked at serving static resources, in particular index.html
and favicon.ico
.
These are the things a browser can deal with: it can show an HTML page and use the favicon.ico
as a visual icon inside the browser tab.
However, if all we could do was return .html
files and images to the browser, we could never build an actual web application.
A .html
file can’t do the following:
- It cannot process data that a user provides by filling in a form.
- It cannot talk to a database and produce a list of available products.
- It cannot remember that it’s me and say “Hey Matthias, welcome back!”.
This is due to the .html
file being a static resource. If the browser fetches it the second time, it will be the same file as when it fetched it the first time.
Get hands-on with 1400+ tech skills courses.