How to Preconnect

I recently received the Algolia newsletter suggesting we use a preconnect strategy

Add <link rel="preconnect" href="https://goto.algolia.com/e/AAAAAA/2020-03-31/BBBBBB/CCCCCCCCC?h=DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"/> to your page head tag to improve the speed of your first Algolia query. Preconnect works by hinting to the browser that your website will load data from Algolia. The browser will take that hint and preconnect with your search cluster, making the connection ready to use and transfer data sooner. This will have a positive impact on the performance of your first query to Algolia, and will especially be felt by your mobile users.

The email used what looks like real values, which I’ve replaced here in case they are. Can someone tell me what the values mean so I can replace them each with my own?

<link rel="preconnect" href="https://goto.algolia.com/e/AAAAAA/2020-03-31/BBBBBB/CCCCCCCCC?h=DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD" crossorigin/>

Hey, thanks for reaching out! It seems that our email provider butchered the links in an attempt to track the open/click rates. It’s a mistake from our side and the link is wrong.

The proper href attribute should be
<link rel="preconnect" href="https://$APPLICATION_ID-dsn.algolia.net" crossorigin /> where you substitute the $APPLICATION_ID with your application id, resulting in something like <link rel="preconnect" href="https://uj5wyc0l7x.algolia.net/" crossorigin/> :slight_smile:

Let us know how the change impacts your website, happy to answer any other questions you might have!