All Collections
Frequently Asked Questions
Redirecting Flipbooks using JavaScript redirects
Redirecting Flipbooks using JavaScript redirects

Use JavaScript redirects to inform visitors and search engines that your Flipbook has moved from one URL to another.

Updated over a week ago

It’s very likely that at some point on your website, you’ll want to redirect from one URL to another. When it comes to Flipbooks in iPaper, redirecting visitors is possible in several ways: setting up an HTTP URL for when your Flipbook isn’t available (and presents an 404 error), or using JavaScript redirects.

📖 This article explains:

HTTP redirects vs. JavaScript redirects

While HTTP redirects, like 301 and 302 redirects, and JavaScript redirects achieve essentially the same result – that of pointing visitors from one URL to another, there are significant differences between them.

HTTP redirects occur server-side, meaning that visitors are redirected when the request to view a URL reaches the server hosting it. By contrast, JavaScript redirects are client-side, meaning that they tell the browser to retrieve content from a different location.

The pros and cons of HTTP redirects

👍 Pros

  • In terms of user experience, HTTP redirects tend to be quicker, since they're handled server-side.

  • As HTTP redirects provide status codes (like 301, or 302) for why the redirect was set up, this allows search engine crawlers to collect information from the new location, helping the page’s SEO.

👎 Cons

  • In iPaper, redirects can be created on a domain level only. It is not possible to define redirects on a Flipbook level.

  • Only one redirect can be defined per Branded Domain.

The pros and cons of JavaScript redirects

👍 Pros

  • As JavaScript redirects are carried out on the client-side, they have the capability of including additional logic into the redirect process.
    For example, a JavaScript redirect can determine the visitor’s browser language settings and redirect them to the appropriate URL counterpart, accordingly.

  • You can use a JavaScript redirect even if you don’t have access to your server configuration.

👎 Cons

  • When crawling your webpage, search engine algorithms may not to render JavaScript, which means that your JavaScript redirect might not be executed.

  • A JavaScript redirect may slow down the crawling and indexing of your website by search engines, due to the extra step taken in rendering JavaScript.

How to set up JavaScript redirects in iPaper

💡 This guide explains how to set up JavaScript redirects only. If you’d like to set up an HTTP redirect, see our guide on this, below:

Setting up your JavaScript redirect requires injecting a code snippet via your Flipbook's Custom Scripting feature. If you'd like to try it yourself, simply replace the appropriate section of the code below, and paste this into the custom script field for your Flipbook:

window.location.replace("FULL URL TO BE REDIRECTED TO");

Of course, if you're not familiar with JavaScript, you can always reach out to us via the messenger in the corner, and we'll help you set this up on your Flibpook.

Did this answer your question?