Problem loading stylesheet

Hi,
I am currently coding a website and I occasionally recieve this error in the console when I clear my cache:

[Error] Did not parse stylesheet at ‘http://subdomain.domain.co.uk/file.css’ because non CSS MIME types are not allowed for cross-origin stylesheets.

My HTML is:

Thanks

cross-origin stylesheets

And which domain are you actually visiting when you see your website? Are you visiting subdomain.domain.co.uk or something else?

Cross origin interaction, embedding and hotlinking onto other domains from a free hosting website is not possible (even if both domains are on free hosting, or even on the same account). So please make sure the domain in your CSS URLs matches the domain you’re actually visiting.

@Admin said:
And which domain are you actually visiting when you see your website? Are you visiting subdomain.domain.co.uk or something else?
I am visiting domain.co.uk

Cross origin interaction, embedding and hotlinking onto other domains from a free hosting website is not possible (even if both domains are on free hosting, or even on the same account). So please make sure the domain in your CSS URLs matches the domain you’re actually visiting.
The CSS file loads when I visit subdomain.domain.co.uk and then reload domain.co.uk

The issue sometimes also occurs with images on subdomain.domain.co.uk

@mmg123 said:

@Admin said:
And which domain are you actually visiting when you see your website? Are you visiting subdomain.domain.co.uk or something else?
I am visiting domain.co.uk

Cross origin interaction, embedding and hotlinking onto other domains from a free hosting website is not possible (even if both domains are on free hosting, or even on the same account). So please make sure the domain in your CSS URLs matches the domain you’re actually visiting.
The CSS file loads when I visit subdomain.domain.co.uk and then reload domain.co.uk

The issue sometimes also occurs with images on subdomain.domain.co.uk

So, as I expected, it’s a cross origin issue. That’s blocked by a security system explained here: https://infinityfree.net/support/javascript-error-using-api-or-mobile-android-app/

Long story short: just move all the files needed for the website on domain.co.uk to domain.co.uk. Embedding stuff from other domains on free hosting (even direct subdomains) is not possible, so trying to be fancy and serving the CSS and images from static.domain.co.uk, assets.domain.co.uk or cdn.domain.co.uk will not work (and is pointless anyways if they are on the same hosting account).

Thanks