3 ms·
The reasoning behind this is a privacy leak attack. Let’s say that you know that, say, your competitor is loading a specific asset at a specific version from a
by robin_reala 4y ago
The reasoning behind this is a privacy leak attack. Let’s say that you know that, say, your competitor is loading a specific asset at a specific version from a CDN. You can then attempt to load that asset as well, and using the Resource Timing API[1] see how long it takes to come down. If it’s 500ms+ you can guess that it’s a network load. If a lower number you could guess that instead it’s come from the cache. You could then target that user with that new knowledge. Safari realised this a long time ago, but it took Firefox and Chrome a while to catch up, or at least to decide that the harm outweighed the benefit.
[1] https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API https://developer.mozilla.org/en-US/docs/Web/API/Resource_Ti...