r/webdev • • Nov 03 '25

Discussion loading spinners should show progress

Indeterminate spinners that just spin forever are stressful because users don't know if something is actually happening or if it's frozen. Even approximate progress is better than no indication.

"Loading your data..." is more reassuring than a silent spinner. "This might take 30 seconds" sets expectations. Showing steps like "connecting, fetching, processing" makes it feel like real work is happening.

Looking at loading patterns on mobbin, the apps that feel most responsive usually give some indication of what's happening and how long it might take. The ones with just blank spinners feel unfinished.

How much effort do you put into loading states versus treating them as an afterthought?

0 Upvotes

63 comments sorted by

View all comments

1

u/UseMoreBandwith Nov 03 '25

that is a problem that exists since the early days of Ajax.

The issue ofc, is that the server needs to send the status regularly. For a long time it was good enough to fake it. Using regular polling or websockets is often not worth the effort.
However, using HTMX it is really easy do

  <div
    hx-get="/job/progress"
    hx-trigger="every 100ms"
    hx-target="this"
    hx-swap="innerHTML">
    <div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-labelledby="pblabel">
      <div id="pb" class="progress-bar" style="width:0%">
    </div>
  </div>

1

u/tonjohn Nov 03 '25

1

u/Lekoaf Nov 03 '25

Which is a pain in the ass to add CSS to.

1

u/tonjohn Nov 03 '25

Still important that people know it exists.

It’s “good enough” for many cases.

0

u/UseMoreBandwith Nov 03 '25

no, the main thing is the backend that needs to communicate the progress, and that is the trick part.

1

u/tonjohn Nov 03 '25

I think you misunderstood the context of this particular conversation.