This is a simple way to get a performance boost if you’re using PHP + Apache. I am using it to boost performance on GoToQuiz. If you are not using Apache, you can still use the PHP portion of this performance enhancement.
Some quick background: maintaining your site’s CSS in multiple files is frequently useful and sometimes necessary. But including multiple CSS files results in a performance hit when your pages load, because each one requires a separate request from the user’s browser to your server. Each request has associated overhead, which can be minimized if you send all CSS in one request.
This is how you can combine your CSS files with PHP and cache them, relying on a clever bit of .htaccess modification:
Did you ever wonder how some sites are able to tailor a message specifically to your city? You might have seen these in ads: “Albuquerque mom loses 50 lbs!” Hmm. How did the site know you live in Albuquerque?
The answer is geolocation based on the user’s IP address. And of course, geolocation can be useful beyond tailoring custom ad messages. The good news? Free geolocation functionality exists!