I just noticed something today while working on a HTML file upload form. I'm testing my server-side processing function (Image conversion & compression) with a REST Client (Postman in my case).
If PHP sets the response's Content-Type
header to application/json
, the 200KB response takes around 30 seconds to be processed (after the request has returned), but if I set it to text/html
, it's done right away in less than a second after the request is completed.
I'm happy that I can make it work, but my curiosity got the best of me, and now I want to know why HTML Content-Type is required. Anyone knows ?