Question

After thorough optimizations of my website (scoring 95 on google PageSpeed & 96 Yahoo YSLOW) I am puzzled by why the header(s?) take up a relatively long time to load. Is 11 KBytes header information not normal? How should a website in which its slowness is caused by headers, be optimized? Suggestions, tests and tricks for php/htaccess are greatly appreciated in order to find and isolate this issue.

enter image description here

enter image description here

Was it helpful?

Solution

So formulating this as an answer. Take a look at the yahoo tips for speeding up your website. yahoo developer network

mainly take care of caching, cache-control and expiry date headers. This has mainly direct influence on the content not the headers but you never know.

Take a look at this this thread

Again its about caching You should also use gzip or module defalt, but again this influences the contents only

OTHER TIPS

Is 11kb of headers normal? Unfortunately, it's not unusual. Is 11kb a lot - definitely. Think of it this way: that's 11kb of data your browser has to download before any of the page data can come through on the wire. If you want to make your site faster, then reducing the amount of time and data that has to be delivered before the first (useful) bytes of the page is a good optimization.

1) Check what's actually consuming all that header space. Chances are, you may have cookies and other data that can be reduced in size.

Having said that, the problem here is not headers exclusively. Instead, based on your diagram it takes your server ~100ms to start serving the headers. It looks like you have redirect, and then another 50ms to generate the response.

2) Can you eliminate the redirect? 3) All things considered, 50ms to generate the response is not unreasonable. If you are capturing above test on local server, then maybe you can reduce the server time through optimization. But for remote cases, 50ms is actually pretty fast - speed of light, not much we can do about it. :-)

P.S. Here's some more info on latency: http://www.igvita.com/2012/07/19/latency-the-new-web-performance-bottleneck/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top