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
Why I Love Tailwind. Why Tailwind is blowing up, why I (the creator of styled-components) love it and how I avoid the downsides of atomi...
New
First poster: bot
WebAssembly has been one of the trendiest intermediate representations since a while. However, its definition of safety means preventing...
New
First poster: AstonJ
Welcome to the 5th edition of the JavaScript Rising Stars, our annual round-up of the JavaScript landscape! The concept is the same as b...
/js
New
First poster: bot
As crappy as 2020 was, JavaScript as a whole still managed to somehow move forward. As the language itself keeps improving thanks to new ...
/js
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
Decided to write this blog post because I couldn’t find any documentation or online examples like the one I’m sharing here. Every example...
New
First poster: bot
Let’s build a fully functioning and settable “analog” clock with CSS custom properties and the calc() function. Then we’ll convert it int...
New
brainlid
In episode 59 of Thinking Elixir, we talk with Joel Kemp about his experience introducing Elixir at Spotify. We learn about the concurren...
New
StuntProgrammer
It’s rare to see a web app that doesn’t use XMLHttpRequest (or fetch, the new API with comparable capability). XMLHttpRequest (which we c...
New
First poster: OvermindDL1
I have to admit: as I’ve watched Tailwind enthusiastically adopted by more and more of the frontend community, I’ve remained skeptical. B...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
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
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1143 25883 760
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New