Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We set up a Netscaler in front of our PHP application server, the netscaler now preforms a large amount of HEAD requests as evidenced by our apache logs. I wonder if each time apache gets a one of these HEAD requests, it executes the PHP application, but then only returns the head information.

If so, I wouldn't see what is the server performance improvement.

share|improve this question
up vote 3 down vote accepted

You can set headers in PHP. Thus a HEAD request would need to execute the PHP code to get all headers. The improvement would be that your server does not have to deliver the whole page. This is not about cpu time but about network usage. And of course, images, scripts, css, ... aren't loaded. Thus you have less network usage and less IO.

share|improve this answer
Thanks, that's what I supposed. But basically we are pushing the bandwidth issue from the application server to the Netscaler, because the Netscaler would serve the page in the stead of the application server, right? Would it make sense to have Netscaler cache only the images, scripts, css, etc? – tomwoods Sep 5 '12 at 17:46
Sorry, I don't know Netscaler. However, caching static content seems more appropriate than caching dynamic content. – Jens Sep 5 '12 at 17:50
Even if a Netscaler (or any caching device) were in play, it would need to be able to check the cached representation for validity, which is when a HEAD gets used. You could, I guess, alter your PHP to see if it was invoked with a HEAD, GET or POST etc. – Cameron Kerr Apr 24 '15 at 11:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.