Hacker News new | ask | show | jobs
by tudborg 4688 days ago
How is the default header of `Content-Type: text/html` Any different form a default header of `Content-Type: text/plain`?

It takes you about 3-4 seconds to change it for your entire project.

1 comments

That's not what I mean, and I don't think it's what the person I replied to meant either. I assume text/html is the default content type for all web frameworks.

I was referring to the fact that the first thing pretty much all PHP apps do is say "Wait! Don't output anything yet! I have code to run!". I believe modern PHP frameworks generally borrow the controller/template pattern from other languages, because it generally makes more sense than PHP's default of outputting HTML unless told otherwise.