Search

Latest Stories

How to Handle JavaScript Redirects

How to Handle JavaScript Redirects

Whenever you have to create a JavaScript redirect, especially for a logged-in user, we recommend that you use a Multiple Conditional element:


We don't recommend a traditional Conditional element because its placement in your layout will result in a rendered (or partially rendered) page, which can display errors or even break the UX if the user isn't logged in. Note the placement in the following image, where some of the page is rendered before the conditional for a user is checked and resolved.

A Multiple Conditional element, on the other hand, allows you to control the order elements are rendered, and will result in a fast load or redirect for your user instead:

If you have any questions about this feature, email support@rebelmouse.com or talk to your account manager today.

We've helped ambitious teams launch, grow,
and outperform. Now it's your turn.
Whether you need a custom solution, a smarter strategy, or just someone to bounce ideas off — we're here for it.
Let's Talk