Re:Browsers, JSON, and FormData
by TheRealPomax on Saturday November 12, 2022 @12:17PM
(#33575019)
This really strikes me as a shining example of "porque no los dos":
No, you do both: you create a server route that accepts that form's POST (or PUT or DELETE or whatever) and you write the code necessary to intercept the form's submit event and runs that same post operation backed by a Fetch request instead, then work the result into the page without needing the navigation action that a bare form uses. Congrats: your site now works both with limited-to-no JS, and as progressive web page when JS is fully available. All you had to do was stick with the basics: have a restful server.
[ Parent
| on HN ]
There are no comments on this comment yet.