Issue: Brief display of restricted content/page before redirection to other page

Hello everyone,

I’m currently facing an issue with my web application. When unauthorized users try to access a restricted page, they briefly see its content before being redirected to another page (based on my condition in the “When Page is Loaded” workflow). This isn’t the smooth user experience I aim for. Could someone kindly guide me on how to handle this efficiently, and Not show the restricted content/page at all?

Your help would be greatly appreciated!

1 Like

I always put all content inside a “main” top-level group that’s initially hidden and shown only when a user has access.

Any “overlay” element (such as header or footer implemented as a Floating Group and thus outside the main group) is also initially hidden and has a conditional to show it based on the visibility of the “main” group.

The result is that no “flash of content” appears when redirecting to another page if a user doesn’t have access - as long as the check is made first thing in the Page is loaded event.

It’s a shame we can’t just initially hide the page element itself, but we can’t :slightly_frowning_face: , so a top-level group is needed.

1 Like

Thanks for your response! Yes that is what I am also currently using. I too wish we did not have to do this hack. Hope the bubble team fixes this critical issue.

Privacy rules are also made for that…

Privacy rules are of absolute paramount importance for controlling data access, but I understood the issue here to be undesirable rendering of UI elements during page redirects, which can occur regardless of privacy rule settings. Maybe I misunderstood though.


Just wanted to add that the issue described here is known behavior and not a bug. While not ideal, the “work-around” is straightforward and not a bother if one simply creates a “template” page to clone future pages from and adopts the practice early on. :slightly_smiling_face:

1 Like

I agree for the “element rendering” UI experience, my reply was more about this part:

Restricted content should never be visible if privacy rules are set correctly. But for UI and element, I totally agree (and often do the same thing)


@deepstartech1 -

You can use a tool to check the redirect is actually working:

Also, note that if you are using the same browser as your bubble editor account or have debug_mode=true, you’ll see this flash. Try it on another browser or incognito mode and you shouldn’t get shown any of the page at all if set up correctly.


See @flusk’s handy article explaining the prerequisites for redirecting user without load page at all. In addition to points detailed there, I’ve observed that it’s also necessary to leave blank the Data to send property in the action sending the user to another page.


I tested @flusk’s approach too. He explained it very well. I applied the logic/condition at the “when page is loaded” workflow directly, but it did not fix the issue for me. Also yes my “Data to send” property is blank too.

Thanks all for your help!

Thanks for the mention @davidb.
You can indeed follow the article or use the Flusk tool to automatically run a test on your pages.

That’s correct - same for URL parameters, but if I’m correct this only applies for dynamic data, so static Data to send or URL parameters should work.

Thanks for the explanation. I confirmed that static URL parameters indeed work (i.e., allow the redirect to remain 302). For redirects away from pages that shouldn’t be loaded at all, I implemented a dedicated page as an innocuous stopover on the way to a final-destination page that requires data to be sent.

Good to hear :laughing:

This topic was automatically closed after 14 days. New replies are no longer allowed.