StuntProgrammer

StuntProgrammer

Retry XMLHttpRequest Carefully

It’s rare to see a web app that doesn’t use XMLHttpRequest (or fetch, the new API with comparable capability). XMLHttpRequest (which we can call XHR if you’re into the whole brevity thing) is as handy as a shirt pocket, but it doesn’t do much to encourage robust and resilient programming practices. Any app that runs in the real world will sometimes encounter transient network interruptions and server outages. We should gracefully recover from both by automatically retrying our requests. But, we shouldn’t turn a brief server hiccup into a full-on fireworks display by retrying too fast or by having every client retry at the same time.

Where Next?

Popular Frontend topics Top

First poster: bot
The No-Framework Framework: JavaScript Without React Part I. How I improved my programming speed by replacing React with plain JavaScrip...
New
psantos
In this tutorial, I’ll walk you step-by-step on how to install TailwindCSS 2.0 on Ruby on Rails.
New
First poster: bot
JavaScript allows calling a function with a different number of arguments than the expected number of parameters, i.e., one can pass fewe...
/js
New
First poster: bot
The challenge of searching static websites is effectively a solved problem with brilliant, yet widely unadopted, solutions. These projec...
New
First poster: bot
PDF documents are a major part of our digital lives and, in an era where we spend most of our time working inside a web browser, enhancin...
New
First poster: bot
Background: Lots of discussions and arguments on Twitter, GitHub, blogs and mailing lists. A summary can be found in eg. this GitHub issu...
New
First poster: bot
The Elm Architecture is one of the great innovations Elm brought to the software industry. But one of the questions that often comes up i...
New
New
First poster: bot
Introduction WebAssembly is a standard of the World Wide Web consortium, which latest official release is WebAssembly Core Specification,...
New
brainlid
You are storing some Phoenix LiveView state in the browser. You want to retrieve that saved state as early as possible to improve the use...
New

Other popular topics Top

PragmaticBookshelf
Brace yourself for a fun challenge: build a photorealistic 3D renderer from scratch! In just a couple of weeks, build a ray tracer that r...
New
AstonJ
Or looking forward to? :nerd_face:
485 12328 258
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
New