Browser cache not clearing for Safari on custom domain

Hi! When I deploy changes to my instance I can see the updates in Safari at my domain but not at my custom domain. (It works as expected in Chrome and Firefox.)

Here’s where I’m getting different results based on what’s cached in the browser:

Emptying the caches or opening in a private window will allow me to see the updates. Reloading the page will not.

The most related posts I’ve found in the community forum point towards service workers being the issue but I don’t think I’m using any service workers.

Any suggestions? (Thanks!)

@jifarris Welcome to the Netlify community.

These two pages are identical here in Southern California.

Thanks for checking it out!

The pages should appear identical to first-time visitors but once you’ve visited it in Safari you’ll only see a cached version of what you first saw. I’ve added a line of text so you can see it for yourself.

Here’s what I see now:

Screen Recording 2021-01-05 at 3.16.45 PM.2021-01-05 15_20_17

Hi, @jifarris. My guesses for a root cause are either TTL (time to live) issues or a service worker.

Our support team can tell you for certain if you send us the x-nf-request-id header for the incorrect response.

In order to troubleshoot this, we need to be able to track the HTTP response with this issue. The simplest way to do this is to send us the x-nf-request-id header which we send with every HTTP response.

There more information about this header here:

If that header isn’t available for any reason, please send the information it replaces (or as many of these details as possible). Those details are:

  • the complete URL requested
  • the IP address for the system making the request
  • the IP address for the CDN node that responded
  • the day of the request
  • the time of the request
  • the timezone the time is in

If you prefer, a HAR file recording of the incorrect response will also contain that information (including the x-nf-request-id and all the other details above as well). Please feel free to send the HAR file if you prefer.

If there are any questions we are happy to answer.

Thanks for the response. I was going to get x-nf-request-ids for you from Chrome (where it was working) and from Safari (where it was not working) but…

…it’s actually working now – for the first time since the site was launched nearly 3 weeks ago. I’m assuming someone fixed it on your end? Thanks!

If you have any info about how it was fixed I’d love to know. We did a lot of troubleshooting on this and it seems many others have as well.

There were no changes made on this side.

As far as how it was fixed, only you have had access to the information required to answer that. If you share that information with me, I would be happy to take a look though.

To troubleshoot I must be able to reproduce the issue or have detailed information from a reproduction. As you were able to reproduce it and we were not able to do so, we would need the information from your reproduction (for example the HAR recording of the issue) in order to be able to determine the root cause.

If there are other questions or concerns, please let us know.

Thanks again for looking into it!

I’ve still been unable to reproduce the issue since it stopped occurring on January 6. (From December 18 to January 6 we saw a 0% success rate with the cache clearing in Safari, as was shown in my screen recording above. From January 6 to January 8 we’ve had a 100% success rate.)

I’ll continue monitoring it and if the issue ever crops back up I’ll try getting a HAR recording in here. Thanks!

1 Like

stoked to hear it got better - and please do let us know if the issues re-occurr and we can dig some more.

1 Like