Resource interpreted as Stylesheet but transferred with MIME type text/plain

Hello there, thanks for reading my post.

I have an issue at https://www.tucango.com/ for a long time and I haven’t been able to solve it: sometimes, my website looses CSS styling like this:

As you can see, it shows this error: " Resource interpreted as Stylesheet but transferred with MIME type text/plain". And after turning CloudFlare’s development mode on and off it looks ok again:

After some time, this issue happens again and again. How could I solve this?

Thanks!

That message seems to refer to your main page. Could it be that your site attempts to embed your main page as CSS resource under some circumstances? I presume you automatically generate the CSS links, so could it be you cut off the actual CSS path in these cases?

Do you get the error regularly? If so, try to pause Cloudflare and check if you still get the message.

1 Like

Check your HTML code and Header response. Make sure the mime type is

type="text/css"

Or just don’t add. Browser know how to deal with it.

If still happening, probably bad configuration is at server end.

This isn’t related to CF. Though, you can purge all Cache and check again!

Thanks for your answers. I have deactivated JavaScript Auto Minify from CF and i haven’t been able to see the issue again. Maybe that was the issue? Hard to believe.

I see 24 places with type=“text/css” @GulshanKumar - Where should I check that? view-source:https://www.tucango.com/en

Difficult to tell. It appears to be CSS, not JavaScript, related and Cloudflare’s Minify usually doesnt touch the content type, however Minify only works in caching context, which development mode disables.

In order to tell more, we would need to be able to reproduce the issue.

Please look at browser Console first pressing F12 key


My website is at https://www.tucango.com/en but I don’t see the issue at any page right now. I will be checking and notify you if the issue comes up again

1 Like

Sorry… I am from mob right now so can’t check it. I will tell you solution as I will come back from Desktop.

1 Like

Sounds great! Thank you

Loads just fine for me.

1 Like

Thanks for testing @sandro - It’s loading fine at the moment, but the issue usually comes back. I will post here as soon as I see it happening again.

Hence my question earlier, if this is a regular error whenever it occurs. If it only happens intermittently it is hard to debug. As I said before, you might want to pause Cloudflare in that case and check if you still experience the issue.

Right now the most likely explanation will be that your site occasionally generates a CSS link incorrectly.

I think that it’s related to CloudFlare because if I activate the development mode while the issue occurs, it starts working fine again. I will be writing as soon as I see the problem again.

At the moment, it’s loading fine.

That could simply mean that your server generated aforementioned invalid link and you got it cached on Cloudflare’s side. This is most likely something you should debug on your server.

Looks like there was a compatibility issue with Javascript. After turning it off, it’s working perfectly.

I will let you know if something happens. Thanks!

This topic was automatically closed after 30 days. New replies are no longer allowed.