<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd" -->

---
title: When broadcasting a Turbo refresh is not enough: faster...
description: Broadcasting a Turbo refresh in Rails/Hotwire is simple but has three downsides: an extra server round trip, a cascade of simultaneous client requests, and a...
canonical: https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When broadcasting a Turbo refresh is not enough: faster UX with versioned immediate updates | daily.dev
og:description: Broadcasting a Turbo refresh in Rails/Hotwire is simple but has three downsides: an extra server round trip, a cascade of simultaneous client requests, and a...
og:url: https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd
og:image: https://api.daily.dev/og/posts/bH1iyX6Yd.png
og:image:alt: When broadcasting a Turbo refresh is not enough: faster UX with versioned immediate updates
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When broadcasting a Turbo refresh is not enough: faster UX with versioned immediate updates

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 7 min read · 0 upvotes · 0 comments

## Summary

Broadcasting a Turbo refresh in Rails/Hotwire is simple but has three downsides: an extra server round trip, a cascade of simultaneous client requests, and a 500ms debounce delay. The fix is to broadcast a replace action with the rendered HTML directly from the controller using `Turbo::Streams::BroadcastStreamJob.perform_later`, bypassing debouncing. However, this introduces a race condition where out-of-order delivery can leave clients in a stale state. The solution is versioned updates: embed a `data-version` attribute in rendered elements, then implement a custom `versioned_replace` Turbo stream action in JavaScript that only applies the update if the incoming version is newer than what's currently on the page. Active Record Optimistic Locking's `lock_version` is suggested as a convenient version source. The result eliminates all original downsides while preserving race-condition safety, at the cost of losing per-user personalized payloads.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://radan.dev/articles/turbo-versioned-updates>

## Similar posts on daily.dev

- [The Turbo \+ ActionCable Trap: When Your Real-Time Rails Feature Fights Itself · edruder.com](https://daily.dev/posts/the-turbo-actioncable-trap-when-your-real-time-rails-feature-fights-itself-edruder-com-apztfe2uz) · Ruby Flow · 0 upvotes · 0 comments
- [How Turbo 8 Morphing Makes Rails Frontend Development Feel Like Magic](https://daily.dev/posts/how-turbo-8-morphing-makes-rails-frontend-development-feel-like-magic-jp8tl1zv8) · Ruby Flow · 1 upvotes · 0 comments
- [Update page title counter with custom turbo streams in Rails](https://daily.dev/posts/update-page-title-counter-with-custom-turbo-streams-in-rails-wtvf7z19m) · RUBYLAND · 1 upvotes · 0 comments
- [Optimistic UI in Rails with optimism... and Inertia—Martian Chronicles, Evil Martians’ team blog](https://daily.dev/posts/optimistic-ui-in-rails-with-optimism-and-inertia-martian-chronicles-evil-martians-team-blog-jybdae5yb) · Martian Chronicles · 0 upvotes · 0 comments
- [Building optimistic UI in Rails powered by Turbo](https://daily.dev/posts/building-optimistic-ui-in-rails-powered-by-turbo-4rmnodrh2) · RUBYLAND · 0 upvotes · 0 comments

---

Tags: [#rails](https://daily.dev/tags/rails), [#hotwire](https://daily.dev/tags/hotwire)

[View this post on daily.dev](https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When broadcasting a Turbo refresh is not enough: faster UX with versioned immediate updates","url":"https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd"},"datePublished":"2026-07-15T10:01:30.624Z","dateModified":"2026-07-15T10:17:43.254Z","description":"Broadcasting a Turbo refresh in Rails/Hotwire is simple but has three downsides: an extra server round trip, a cascade of simultaneous client requests, and a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/12b133c07f22a2c9a49c81e521362e0b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/12b133c07f22a2c9a49c81e521362e0b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"RUBYLAND","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/when-broadcasting-a-turbo-refresh-is-not-enough-faster-ux-with-versioned-immediate-updates-bh1iyx6yd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rails,hotwire","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"When broadcasting a Turbo refresh is not enough: faster UX with versioned immediate updates"}]}
```

