Gatsby - Form seems to work only once due to browser cache

Hi !
I have an issue with the form served at (elated-carson-9071e0 on netlify). The form is using netlify’s captcha.

The build is fine, the form name appears just fine in netlify UI and I’m able to receive submissions, but only on the first navigation to the site. After that, the captcha does not appear anymore and the form does not work anymore unless I clear the browser cache.

Indeed when I open the dev tools, I can still see the data-netlify=true attribute on the form.
When I clear the cache, the attribute disappear and everything is fine.

any hint ?

Here’s the form code :

<form name="contact" method="POST" data-netlify="true" data-netlify-recaptcha="true">
        <label>Email address:</label>
        <input type="email" name="email">
        <textarea name="message"></textarea>
        <div data-netlify-recaptcha="true"></div>
        <button type="submit">Send</button>

It’s probably because of your service worker. On first load, it’s caching up to around 25 MB! A typical blog probably doesn’t need that much. It seems to be caching Google ReCaptcha scripts too:


So, that might be a possible cause. Try removing the service worker or control what it caches.

Nice find @hrishikesh!

@MakanWG are you using gatsby-plugin-offline?


Very nice catch @hrishikesh !
Disabling the service worker did the trick !
Thanks !

Yup, I followed the tutorial at to remove the service worker and this solved my issue.