Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [content-type]

Content-Type is an HTTP header that tells the client the type of content that is being served. Browsers will do MIME sniffing in some cases, and will not necessarily follow the value of this header; to prevent this behavior, the header X-Content-Type-Options can be set to nosniff.

Filter by
Sorted by
Tagged with
2
votes
0answers
32 views

.mht files display as junk text from Jetty server

I have some .mht files which load fine from local files but when loaded from the Jetty web server display as junk text. What can I do to make them work correctly from my Jetty web server? I know ...
4
votes
0answers
80 views

Responding other 'Content-Type' different from 'Accept' list

As all you know (else follow this question) the requesting Accept header allows client to specify the expected MIME types for response content. But my case is: client indicates an Accept of type ...
1
vote
0answers
161 views

How can I make my socket.id/nodejs server serve CSS files with the correct mime-type?

I'm using socket.io and https://socket.io/get-started/chat/ to produce a very basic chat server on a remote desktop running Debian. When I access the server's "main" page on port 3000, it fails to ...
3
votes
1answer
3k views

Nginx: set Content-Type by URI problem

I'm setting up small personal file hosting, I made a backend to store uploaded files by their hash directly on the HDD like /f/ab/cd/ef012345678..., but without file extensions and generate an URI ...
4
votes
1answer
186 views

Does Google search prefer PDF files over HTML files in its search results?

I have noticed for some time, that when I search for something using Google search, I gets lots of hits that are all PDF links. (I know I can tell it not to find PDF hits using -filetype:pdf) But the ...
1
vote
1answer
161 views

In httpd.conf why would you want AddType for phps?

We have an AddType as follows: AddType application/x-httpd-php-source .phps I was wondering what this was, and did some searching. It seems this is barely documented anywhere. Based on a hunch, I ...
4
votes
2answers
843 views

How to configure MediaWiki to allow uploading text/plain ".conf' files

I'm having a heck of a time getting our internal MediaWiki to allow CONF file uploads. A CONF file is just a plain text file with a *.conf extension. In ...\LocalSettings.php, I added txt and conf to ...
1
vote
1answer
109 views

Fixing french language characters - some OK some not

I need to fix some pages on a friend website somebody did for him. It is a french-speaking website. Here is the code of the page showing all OK characters, ...followed by the code of a non-OK showing ...
0
votes
1answer
295 views

Webpage loading with wrong content-type after setting up CloudFlare

I recently migrated my blog to the Ghost service, I've also setup an alias DNS record with CloudFlare. While showing the blog to a colleague I discovered one of the posts wasn't loading properly and ...
1
vote
1answer
247 views

Does image mime-type affect SEO?

I have uploaded images as mime-type application/octet-stream. They are served well if sourced from an image tag but Chrome for example cannot open them directly, always asks for download. The ...
118
votes
5answers
168k views

Difference between the Accept and Content-Type HTTP headers

So the Accept header tells the server the MIME-type of the resource the browser is looking for. For example, the server can send plain text, HTML, JSON, etc. OK, that makes sense, but when I look at ...