Shareable preview link not working

Hey @kris,

Apologies for the late reply. I replied to your question on GitHub regarding previews and Gatsby.

GitHub Issue: [v4] Shareable links not working · Issue #403 · prismicio/prismic-gatsby · GitHub

Reposting here for others:

Hey @kb1995, sorry for the delayed response - my mistake! Shareable links are supported in Gatsby as normal, but there are some parameters around its usage (this is for previews in general, not just for Gatsby).

If using Chrome, previews will not work in Incognito browsers

Chrome blocks cross-site cookies which is required for previews to work. The Prismic toolbar sets a cookie on the prismic.io domain which is then read on your deployed site. Previews are only activated on your site if that cookie is present and readable.

This means share links will not work in Incognito browsers for the same reason. To test if share links work, copy the link, sign out of Prismic, then open the link in a normal browser. It should load.

Related link: Enabling 3rd Party Cookies for Chrome “Incognito” Mode and Safari for Mac | Kaltura Knowledge Center

If using Safari, previews will not work unless cross-site cookie are enabled

Safari blocks cross-site cookies by default. As described above, cross-site cookies are needed to support Prismic previews.

To enable cross-site cookies in Safari, open Safari's Preferences, navigate to the Privacy section, and uncheck "Prevent cross-site tracking."

This means share links will not work in Safari browsers for the same reason. Ensure cross-site cookies are allowed in Safari before testing a share link.

Related link: Preview mode doesn't load in Safari

2 Likes