Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name with gear icon in Chrome network requests table

enter image description here

enter image description here

(30119999.xml in pic1, has a gear mark pre name)

I set this request in Web Worker, response data is ok and I terminated it in onmessage callback

but why the request always in pending and can't preview, please help.

pseudocode:

const workerBlob = new Blob([`onmessage = function (event) {
    const xhr = new XMLHttpRequest();
    xhr.addEventListener('load', function () {
        postMessage(xhr.response);
    });
    xhr.open('GET', event.data.url, true);
    xhr.send();
}`], { type: 'application/javascript' });
const workerURL = URL.createObjectURL(workerBlob);
const worker = new Worker(workerUrl);
worker.postMessage({url});
worker.onmessage = (message) => {
    // do something
    worker.terminate();
};
like image 944
MagicJuly Avatar asked Jan 19 '18 08:01

MagicJuly


People also ask

How do I find the request in Network tab?

Simply go to the page and open the network tab. You can see the network tab by hitting cmd + opt + j on your Mac or ctrl + shift + j in Windows. It will open up the console tab in DevTools by default. Once the console tab is open, simply click on the network tab to make it visible.


1 Answers

According to Debugging Service Workers :

The gear icon signifies that these requests came from the Service Worker itself. Specifically, these are the requests being made by the Service Worker's install handler to populate the offline cache.

like image 105
Saman Mohamadi Avatar answered Sep 25 '22 08:09

Saman Mohamadi