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?
            Asked
            
        
        
            Active
            
        
            Viewed 64 times
        
    1
            
            
        - 
                    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
