I was using Dareboost (SEO) and got this error and I couldn’t find anywhere what the solution is so I thought I’d give this a try.
Resource has a non-consistent extension with its actual content.
The extension of a resource allows to identify easily its content
type. You have no reason to indicate a different extension of the
actual content type of the resource.For instance, the file resource.js must use a Content-Type HTTP header
equals to application/javascript. You can check the Content-Type HTTP
header value using a debug tool like Firebug.This page contains one resource uses an extension that is not
consistent with its Content-Type HTTP header:https://raw.githubusercontent.com/Semantic-Org/Semantic-UI/0.9.6/build/packaged/css/semantic.min.css
(detected: text/plain; charset=utf-8 | recommended: text/css)
The relevant code:
<!DOCTYPE html>
<html lang="en" class="no-js" ng-app="developerBlog">
<head>
<link Content-Type="text/css" data-require="semantic-ui@*" data-semver="0.9.6" rel="stylesheet" href="https://raw.github.com/Semantic-Org/Semantic-UI/0.9.6/build/packaged/css/semantic.min.css" />
</head>
Sorry if this sounds like a stupid question.
2
Answers
Github is claiming your stylesheet is written in plain text (i.e. not CSS).
Don’t use raw.githubusercontent.com as a hosting provider. That isn’t what Github intend it for, and it isn’t well suited for the job.
As a completion to what Quentin said, there are some services which offer raw github files with the proper Content-Type.
https://rawgit.com/ is one of them.
RawGit serves raw files directly from GitHub with proper Content-Type headers.
And of course you can keep it free, or if you want stability and things you can go for paid plans.
I didn’t recommend using this kind of services, but it’s your choice.
Or at least don’t use this in production. In dev environment it looks like a reasonable idea.