DevTools technical writer and developer advocate here. As of January 2018:
- You can't network-throttle individual requests in DevTools. You can block them, though, which is what I assume you mean by "timeout". See Block Requests.
- You could use a service worker to network-throttle individual requests.
Haven't tested this code, but something like this might work for the service-worker-based throttling:
self.addEventListener('fetch', event => {
const TARGET = 'example.com';
const DELAY_MS = 1000;
if (event.request.url === TARGET) {
setTimeout(() => {
event.respondWith(caches.match(event.request));
}, DELAY_MS);
}
});
if
block didn't output anything when the calls were fired. Is there some small tweak that would make this work in the latest version of Chrome (78.x)? – Methylnaphthalene