I’m trying to make a web app with a static HTML frontend and a RESTful backend. I’m used to server-side rendering but want to try something new.
Here’s my plan:
- Use static HTML files
- Fetch data with JavaScript from a REST API
- Make URLs bookmarkable
I’m wondering how to handle bookmarkable URLs when the HTML and data come from separate requests. For example:
/users/
- Loads users.html
- Makes AJAX call for user list
/users/bob
- Loads user.html
- Makes AJAX call for Bob's info
Is this a good approach? It seems flexible for backend work and easier for designer collaboration. Has anyone done this before? Are there better ways to do it?
I’d love to hear your thoughts or suggestions. Thanks!