Responsible JavaScript

Responsible JavaScript

Jeremy Wagner

Once the server handles the subscription request, the browser is redirected back to the user’s profile page. Because the HTML is regenerated for that request, the state provided by the server will then show that the user has subscribed to that profile. If this interaction seems inefficient compared to a JavaScript fetch request, you’re not wrong! Thing is, though, the goal at this stage isn’t to be efficient but to set a baseline that expands access in the absence of JavaScript. There are many causes for why JavaScript may fail to load even when page markup succeeds. If—when—that happens, we can still offer a minimally viable experience.
725-731