Best practices

Recommendations and usage patterns that help the performance of your web applications.

API pre-connect

API pre-connect is recommended for improved request timings. To enable it, place the preconnect directive as early as possible in your head tag:

<link rel="preconnect" href="">
<link rel="preconnect" href="">
... styles, js etc

Note that you always need to pre-connect to If you're using the CDN version of the script, you also need to pre-connect to If you're using the EU API, use this pre-connect URL:

Cookie domain

This configuration option should only be used if you're running FingerprintJS Pro on multiple subdomains and want the identification process to span all of them.

When you're using FingerprintJS Pro on multiple subdomains, you need to configure the cookieDomain .


import { FP } from "@fp-pro/client"
let fp = await FP.load({
region: "us",
client: "token",
cookieDomain: ""})

For instance, you're running the PRO version on and In order for the identification cookie to work on both subdomains, configure the cookieDomain to be This will set the cookie for top-level domain and all subdomains.

Note that the cookie domain shouldn't include the preceding dot. Incorrect: cookieDomain: "" Correct: cookieDomain: ""