Skip to content Skip to sidebar Skip to footer

Get Access To Or Acquire Files On Network Tab In Developer Console

Is possible to access or acquire the files that are passed to the client from the server, the files displayed on the Network tab in the developer console? I came across this questi

Solution 1:

Yes. you can do it by using Service Workers.

Service Worker is a script which runs on your browser separated from your website. It allows to run background javascript functions which is not need any user interaction (Logs / Analytics).

And

Service worker is a programmable network proxy, allowing you to control how network requests from your page are handled.

Learn More Features of Service Workers


Sample Service worker which will be activated for all /sw.js requests from developers.google.com

if ('serviceWorker'in navigator) {
  window.addEventListener('load', function() {
    navigator.serviceWorker.register('/sw.js').then(function(registration) {
      // Registration was successfulconsole.log('ServiceWorker registration successful with scope: ', registration.scope);
    }, function(err) {
      // registration failed :(console.log('ServiceWorker registration failed: ', err);
    });
  });
}

NOTE : You cannot intercept other website's traffic using service workers. That is browser level control, For that you need to use browser level extensions or packet sniffers such as Wireshark or Brupsuite.

Post a Comment for "Get Access To Or Acquire Files On Network Tab In Developer Console"