The JavaScript on my website loads several JSON to initialize itself.
I would like to preload them so, when the JavaScript will launch an Ajax request on it, they wi
If you have the same problem as me, your response is probably being sent with Vary: Accept
, the preload request is sent with Accept: */*
, and the fetch/xhr request is being made with Accept: application/json
.
It seems like the preload Accept:
behavior can't be changed (sigh), so you'll have to either remove the Vary: Accept
, or make the fetch/xhr request with a matching Accept:
header.