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 will be loaded instantaneously.
A new link tag exists for that.
I tried to use it to load a JSON like that :
<link rel="preload" href="/test.json">
However, Chrome seems to load it twice and present a warning in the console :
The resources test.json was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.
So it seems that preload doesn’t work for JSON. Indeed, I haven’t found reference to JSON in the specification.
Is that correct or am I doing it wrong ?