Hi everyone,
I’m looking for guidance on how to reliably get the actual frontend version/revision a user is currently running in Retool, and ideally send it automatically in request headers at the resource level.
Context
We have a Retool app used internally, and users sometimes keep old tabs open for a long time.
Independently of breaking changes, we want to always log which frontend version the user is actually using on our backend (for observability/debugging/audit purposes).
On top of that, in some cases we also ship changes that are effectively breaking for older tabs, so we’d like the option to enforce a minimum frontend version as well.
We already inject some headers at the resource level (for example, sending the performer/current user email), which is great because it applies to all queries using that resource and avoids updating every query manually.
What we tried
We tried using retoolContext.pageTag (the value we also display in the app UI).
At first it looked correct, but we discovered it doesn’t seem to represent the version the user originally loaded in their tab.
It appears to behave more like the current live version/tag, so when a query runs, the value is re-evaluated and resolves to the latest live version — even if the user is still on an old tab and hasn’t refreshed.
That means it’s not reliable for:
-
Logging the actual frontend version the user is currently running
-
Enforcing a minimum version when needed
Possible workaround (but not fully happy with it)
I think a workaround could be:
-
On page load, run a script and store the version in a variable/state value
-
Then use that stored value for all requests (so it stays stable for that tab/session)
The problem is: I can only seem to reference that kind of variable/state in the query context, not in the resource-level header configuration.
So if I go this route, I’d need to manually add the header to every query, which is exactly what I’m trying to avoid.
My questions
-
Is there a reliable Retool-provided value for the exact app version/revision loaded in the user’s current tab (not just the latest live version)?
-
Is there any way to reference app state / variables / temporary state / script-generated values from the resource context (for resource-level headers)?
-
Does Retool automatically send any header that already includes app version/revision/page tag info?
-
What is the recommended pattern if we want to:
-
always log the actual frontend version used by the client, and
-
optionally enforce a minimum version from the backend side,
while avoiding manual changes in every query?
-
Thanks a lot — even a workaround or recommended pattern would be super helpful.