Form EmbeddingWordPress

Step 3: Optimize

Optimize Surface Form loading speed

Add the following code to your site's <head>. With WPCode, go to Code Snippets > Header & Footer and paste it into the Header section.

<!-- Speed up connections to forms.withsurface.com by performing early DNS resolution and TCP handshake -->
<link rel="dns-prefetch" href="https://forms.withsurface.com">
<link rel="preconnect" href="https://forms.withsurface.com" crossorigin>

<!--  Fetch the form in advance, so it's ready when a user opens it. -->
<link rel="prefetch" href="REPLACE ME WITH FORM URL" as="document">

Replace REPLACE ME WITH FORM URL with a Surface Form URL.