
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.
Popular Frontend topics

By @kobaltz
Here’s a related thread about StimulusReflex - an exciting new way to build modern, reactive, real-time apps with Rails.
New

You can write fast, modern, responsive web applications by generating your HTML on the server, and delivering that (with a little help) d...
New

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

The TypeScript type system is immensely powerful, and while the language itself is, of course, Turing complete, so is the type system its...
New

Add WebAssembly, get performance. Is that how it really works?
The incredibly unsatisfying answer is: It depends. It depends on oh-so-ma...
New

VanillaJS v. jQuery v. hyperscript
Below are comparisons of how to implement various common UI patterns in vanilla javascript, jQuery an...
New

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

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

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

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

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

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

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

Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New

API 4
Path:
/user/following/
Method:
GET
Description:
Returns the list of all names of people whom the user follows
Response
[
{ ...
New

Saw this on TikTok of all places! :lol:
Anyone heard of them before?
Lite:
New

Biggest jackpot ever apparently! :upside_down_face:
I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New

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

Author Spotlight:
David Bryant Copeland
@davetron5000
We’re so happy to bring you another Author Spotlight, a series where we sit dow...
New

I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc.
However, I don’t...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /java
- /haskell
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /scala
- /zig
- /sublime-text
- /debian
- /textmate
- /nixos
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /spring
- /manjaro
- /django
- /diversity
- /lua
- /nodejs
- /c
- /julia
- /slackware
- /neovim