1

I need to execute a piece of code in the background.js file of my chrome extension only if the web page is of mime type "text/html".I understand that I cannot use document.contentType in background. What are my options?

ritu
  • 75
  • 1
  • 10
  • You need to request the wbepage headers. See: [Accessing the web page's HTTP Headers in JavaScript](https://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript) – Tigger Jul 24 '17 at 05:47

0 Answers0