Sending HTTP headers by webserver or PHP?
It is equally possible to send HTTP headers by webserver or script. I use PHP on Nginx. Is there any different to send HTTP headers (such as Cache-Control) by nginx or PHP?
Is it faster to send headers by webserver? and does it have an effect on earlier processing the HTTP request?
Is there any different to send HTTP headers (such as Cache-Control) by nginx or PHP?
Nope, nginx may overwrite (or duplicate headers sent by your application level (PHP using PHP-FPM I guess).
Is it faster to send headers by webserver?
faster? Do you have any performance problems at that level? If not, forget that.
Does it have an effect on earlier processing the HTTP request?
HTTP headers are sent back to the client, so it happens at the response and not the request time.
Check more discussion of this question.
No related posts.
Leave a comment
Recent Posts
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?





