axios-cache-interceptor icon indicating copy to clipboard operation
axios-cache-interceptor copied to clipboard

Bug: Safari does not respect cacheTakeover

Open CatchABus opened this issue 3 months ago • 1 comments

What happened?

Our app uses the web storage but It seems Safari does not respect cacheTakeover and stores responses into its cache even though the request headers are send. Lib works fine with Chrome and Firefox so I understand Safari does not respect no-cache at all.

This was tested with Safari version 18.6 (20621.3.11.11.3)

axios-cache-interceptor version

v1.8.2

Node / Browser Version

23.1.0

Axios Version

v1.10.0

What storage is being used

Web Storage

Relevant debugging log output

There is no strange output.

CatchABus avatar Sep 15 '25 13:09 CatchABus

@arthurfiorette Thanks a lot for trying to take care of this but it seems that problem still persists in 1.8.3 as well. Maybe we should leave the issue as open.

CatchABus avatar Sep 19 '25 08:09 CatchABus

@arthurfiorette Has this been tested on safari? I tested v1.9.1 and saw no difference. Trying to understand if there's still something wrong on my side or AI agents lie like they always do 😆

CatchABus avatar Dec 10 '25 14:12 CatchABus

@CatchABus yes, I tested it myself after this PR...

arthurfiorette avatar Dec 10 '25 15:12 arthurfiorette

I guess this is the most this library can do, if your case is not working, just append a random query param every time and discard that param in this library key generator.

arthurfiorette avatar Dec 10 '25 15:12 arthurfiorette

Maybe adding Vary * as a response hader in your backend solves it.

https://stackoverflow.com/a/54335325

arthurfiorette avatar Dec 10 '25 15:12 arthurfiorette