necolas / normalize.css

A modern alternative to CSS resets
http://necolas.github.io/normalize.css/
MIT License
52.48k stars 10.67k forks source link

MIME-type, ‘text/html’, not ‘text/css’ #820

Closed PaulGuijt closed 4 years ago

PaulGuijt commented 4 years ago

I try to include the normalize.css in my WordPress theme, by fetching it at https://necolas.github.io/normalize.css/latest/normalize.css.

It doesn't succeed because its MIME-type, ‘text/html’, is not ‘text/css’. Can you change its MIME-type?

ghost commented 4 years ago

Are you sure that there is an issue? I just curled the headers and it has the correct MIME type.

HTTP/2 200 OK
server: GitHub.com
content-type: text/css; charset=utf-8
x-origin-cache: HIT
last-modified: Mon, 05 Nov 2018 02:35:30 GMT
etag: W/"5bdfac72-17fa"
access-control-allow-origin: *
expires: Wed, 10 Jun 2020 04:29:55 GMT
cache-control: max-age=600
....

Since it's hosted on GitHub pages, if there is a MIME issue, it'd be GitHub's fault - and nothing that the page owner can do.

Also, are you using this in production? If so, you might want to look at a CDN link; the cache-control GitHub sets is about 10 minutes before cache becomes stale.

PaulGuijt commented 4 years ago

OK, thanks, I'll investigate further.