Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can git store the mime-type of a file, like SVN does, for browsing html?

Tags:

git

github

svn

I've just pushed my first repo to github but when I browse my html it is served as txt. Is this something that I can set similar to svn's props? Or is this simply a github inadequacy?

I can't seem to find anything on git, github or here that helps.

like image 554
Brendan Heywood Avatar asked Aug 21 '10 12:08

Brendan Heywood


People also ask

Where do I put MIME type in HTML?

Look for a <meta> element in the page source that gives the MIME type, for example <meta http-equiv="Content-Type" content="text/html"> . According to the standards, the <meta> element that specifies the MIME type should be ignored if there's a Content-Type header available.

What is MIME type in Javascript?

MIME (Multipurpose Internet Mail Extensions) type is a standard way of describing a data type in the body of an HTTP message or email. The MIME type is passed in the Content-Type header. For example, the Content-Type: text/html header tells the browser that it received an HTML page.


1 Answers

File extension to mime-type mapping is, at best, a broken workaround. Two examples among many. Prolog used the .pl extension long before Perl existed. Files with a .txt extension may contain e.g. Markdown text and there often are good reasons to not use a .md or similar extension.

like image 182
Paulo Moura Avatar answered Oct 26 '22 23:10

Paulo Moura