Internet Marketing Tips, Suggestions, & Ramblings

PHP Session HTTP Header Optimization

Let’s make the Web faster. I perceived something that may be of interest in regards to PHP, sessions, and SEO. On at least one installation, the default HTTP headers sent by the function session_start( ) were set to disable cache. In some cases, I think these headers may not be “good for Googlebot.”

As you may know, Google made an algorithm update that takes into account many aspects of site performance, often called Page Speed. Optimizing HTTP headers is one of the checkpoints and enabling browser caching via HTTP headers is a sub-point. If Googlebot respects site performance enhancing HTTP headers then they’ll probably also acknowledge wacky ones like the PHP session_start( ) default HTTP headers that say, “do not store a copy of this page for cache; always check with the server to see if you have the most recent copy of a page immediately before and after you request a page because this content expired back in 1981 and today is April 13, 2010.”

The perceived solution for the installation was to start sessions only on pages that needed them- instead of everywhere. Now, revisiting the topic I’ve also learned that using the session_cache_limiter( ) function to control what headers are sent may also work.

What are your experiences with this?


About Garry Grant

Garry Grant is one of the premier experts in the fields of search engine optimization and Internet Marketing. This bold statement is proven by Garry’s remarkable track record of successes. At SEO Inc., Garry is responsible for setting the strategic direction, developing proprietary technologies, overseeing the staff, and setting corporate sales and marketing goals. He has also earned a reputation as an educational and captivating speaker.