Ready to Learn?Ex Libris products all provide open APIs

Tech Blog

 

Primo new UI - Boosting performance with a simple iframe

Primo Dev on November 19th, 2017

Introduction 

If you are using the new Primo User Interface (UI) we’d like to provide you with a quick tip to improve the initial load of the new UI and boost performance. 

We developed the Primo new User Interface to be a Single Page Application (SPA),This post will help you improve the initial load of the new Primo UI.

This change(The move to a single page application)  together with the facts:

1. Patrons access the interface through a publicly accessible terminal on campus, which often implement a cookie free/ cache free session for each patron.

2. Increased number of patrons using the incognito mode on browsers.

affect the initial load of the application.

In support of our continuous effort to reduce the code bundle size so the initial load will be optimal, we suggest you use a small code snippet to improve the initial load.

The Use Case

 

When a user accesses the new Primo UI on a cache clean terminal the initial load affects the time required to render search results.

 

The solution

 

If you add an iframe with a link to your new Primo UI at the bottom of your library portal html page, this will initiate the bundle download before the user starts his search session and boost performance.

 

Exmaple:

 

 
<html>


<head>

</head>

<body>

</body>

<iframe style="height:0px;width:0px;position:absolute;left:-100px" src="https://<<primo-base-url>>/primo-explore/search?vid=<<primo vid>>"></iframe>

</html>