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

AstonJ
By @kobaltz Here’s a related thread about StimulusReflex - an exciting new way to build modern, reactive, real-time apps with Rails.
New
First poster: bot
You can write fast, modern, responsive web applications by generating your HTML on the server, and delivering that (with a little help) d...
New
CommunityNews
As JavaScript developers, the sheer amount of stuff we’re expected to know is enormous, and it grows bigger every day. With so many diff...
New
First poster: bot
The TypeScript type system is immensely powerful, and while the language itself is, of course, Turing complete, so is the type system its...
New
First poster: bot
Add WebAssembly, get performance. Is that how it really works? The incredibly unsatisfying answer is: It depends. It depends on oh-so-ma...
New
First poster: bot
VanillaJS v. jQuery v. hyperscript Below are comparisons of how to implement various common UI patterns in vanilla javascript, jQuery an...
New
First poster: bot
I had the chance to toy around with Deno recently. And with “toy around” I mean dissecting it into little pieces and see how the sausage ...
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
brainlid
On your LiveView page, you are using a custom component. You want to be able to pass HTML attributes into the component, but the componen...
New
First poster: bot
Holograms, light-leaks and how to build CSS-only shaders - Robb Owen . Get a shiny WebGL look without actually using WebGL. In this arti...
New

Other popular topics Top

Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New