Title: Refused to apply style from &#8216;https://example.com/#&#8217;
Last modified: September 6, 2020

---

# Refused to apply style from ‘https://example.com/#’

 *  Resolved [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * (@minhazul007)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/)
 * Getting this error on chrome dev tools console,
 * `Refused to apply style from 'https://example.com/#' because its MIME type ('
   text/html') is not a supported stylesheet MIME type, and strict MIME checking
   is enabled.`
 * The line where this issue originates,
 * `<link rel='stylesheet' id='companion-bundle-css' href="#" data-href='https://
   example.com/wp-content/plugins/mesmerize-companion/theme-data/mesmerize/assets/
   css/companion.bundle.min.css' type='text/css' media='all' />`
 * Please fix it ASAP! It’s also making the site slow by adding 1-2sec extra loading
   time.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * (@minhazul007)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/#post-13368167)
 * I think this is the code,
 *     ```
       667	        function mesmerize_defer_css_scripts( $tag ) {
       668	        $matches = array(
       669	                'fonts.googleapis.com',
       670	                'companion.bundle.min.css',
       671	        );
       672	
       673	    if ( ! mesmerize_is_customize_preview()) {
       674	        foreach ($matches as $match) {
       675	            if (strpos($tag, $match) !== false) {
       676	                return str_replace('href', 'href="#" data-href', $tag);
       677	                        }
       678	                }
       679	        }
       680	
       681	        return $tag;
       682	}
       ```
   
 *  Thread Starter [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * (@minhazul007)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/#post-13368187)
 * Just removing `href="#"` fixed the error. No error are shown.
 * `676 return str_replace('href', 'data-href', $tag);`
 *  Thread Starter [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * (@minhazul007)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/#post-13368313)
 * Also If I put `href=""` it works also,
 * `676 return str_replace('href', 'href="" data-href', $tag);`
 *  Thread Starter [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * (@minhazul007)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/#post-13378728)
 * > 667 function mesmerize_defer_css_scripts( $tag ) {
   >  668 $matches = array( 669‘
   > fonts.googleapis.com’, 670 ‘companion.bundle.min.css’, 671 ); 672 673 if ( !
   > mesmerize_is_customize_preview()) { 674 foreach ($matches as $match) { 675 
   > if (strpos($tag, $match) !== false) { 676 return str_replace(‘href’, ‘href=”#”
   > data-href’, $tag); 677 } 678 } 679 } 680 681 return $tag; 682 }
 * This is on **inc > functions.php**
    -  This reply was modified 5 years, 8 months ago by [minhazulOO7](https://wordpress.org/support/users/minhazul007/).
 *  Thread Starter [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * (@minhazul007)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/#post-13378766)
 * This seems fixed on **1.6.97**. inc > functions.php > [Line 676](https://themes.trac.wordpress.org/browser/mesmerize/1.6.97/inc/functions.php?rev=136189#L676)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Refused to apply style from ‘https://example.com/#’’ is closed to new
replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mesmerize/1.6.184/screenshot.jpg)
 * Mesmerize
 * [Support Threads](https://wordpress.org/support/theme/mesmerize/)
 * [Active Topics](https://wordpress.org/support/theme/mesmerize/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mesmerize/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mesmerize/reviews/)

## Tags

 * [href](https://wordpress.org/support/topic-tag/href/)
 * [mime](https://wordpress.org/support/topic-tag/mime/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * 5 replies
 * 1 participant
 * Last reply from: [minhazulOO7](https://wordpress.org/support/users/minhazul007/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/refused-to-apply-style-from-https-example-com/#post-13378766)
 * Status: resolved