GitHub user dosubot[bot] added a comment to the discussion: Regarding the 
issues related to the homepage in Superset version 5.0.0

<!-- Answer -->
Auto-refresh stops working when you use /?standalone=2 because this mode hides 
the dashboard header, which is responsible for starting the auto-refresh timer 
in Superset's frontend. When the header is not rendered, the periodic refresh 
logic never runs, so charts don't update automatically. This isn't documented 
as a bug, but is a side effect of how the dashboard UI is structured in 
Superset 5.0.0 
[reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx#L364-L717).

If you need auto-refresh in embedded/standalone mode, the most practical 
workaround is to use JavaScript in your embedding page to reload the iframe at 
your desired interval—for example:

```js
setInterval(() => {
  const iframe = document.getElementById('superset-dashboard-iframe');
  if (iframe) {
    iframe.contentWindow.location.reload();
  }
}, 5 * 60 * 1000); // every 5 minutes
```

There is no built-in config or parameter to enable native auto-refresh in 
standalone mode when the header is hidden 
[reference](https://github.com/apache/superset/discussions/34340).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/5f293657-3d02-49bb-86cd-4a48711af236?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Auto-refresh%20stops%20working%20when%20you%20use%20/%3Fstandalone%3D2%20because%20this%20mode%20hides%20the%20dashboard%20header%2C%20which%20is%20responsible%20for%20starting%20the%20auto-refresh%20timer%20in%20Superset%27s%20frontend.%20When%20the%20header%20is%20not%20rendered%2C%20the%20periodic%20refresh%20logic%20never%20runs%2C%20so%20charts%20don%27t%20update%20automatically.%20This%20isn%27t%20documented%20as%20a%20bug%2C%20but%20is%20a%20side%20effect%20of%20how%20the%20dashboard%20UI%20is%20structured%20in%20Superset%205.0.0%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx%23L364-L717%29.%0A%0AIf%20you%2
 
0need%20auto-refresh%20in%20embedded/standalone%20mode%2C%20the%20most%20practical%20workaround%20is%20to%20use%20JavaScript%20in%20your%20embedding%20page%20to%20reload%20the%20iframe%20at%20your%20desired%20interval%E2%80%94for%20example%3A%0A%0A%60%60%60js%0AsetInterval%28%28%29%20%3D%3E%20%7B%0A%20%20const%20iframe%20%3D%20document.getElementById%28%27superset-dashboard-iframe%27%29%3B%0A%20%20if%20%28iframe%29%20%7B%0A%20%20%20%20iframe.contentWindow.location.reload%28%29%3B%0A%20%20%7D%0A%7D%2C%205%20%2A%2060%20%2A%201000%29%3B%20//%20every%205%20minutes%0A%60%60%60%0A%0AThere%20is%20no%20built-in%20config%20or%20parameter%20to%20enable%20native%20auto-refresh%20in%20standalone%20mode%20when%20the%20header%20is%20hidden%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/discussions/34340%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on X](https://img.shields.io/b
 
adge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36221)

GitHub link: 
https://github.com/apache/superset/discussions/36221#discussioncomment-15216818

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to