Category: "LAMP"

Browser Cache Management - Ensure Updates

httpd.conf (or equivalent) # Cache js and CSS files for 6 months - with a timestamp <FilesMatch "\.(js|css)$"> ExpiresActive On ExpiresDefault "access plus 6 months" Header set Cache-Control "max-age=15552000" RewriteEngine On R… more »

Linux - Using file -i instead of the input accept attribute

The file input allows an accept attribute to indicate what type of file may be submitted. The type is the client's MIME type, which may vary by operating system, installed applications, and end user configuration. A sample set of MIME types used for… more »

Great New Web Resource

CoderZone.org launched recently. It's great new resource for web people, from 'n00bs' to 'w00ts'. What makes it special: A great team of moderators. These guys are experienced and know the web. A library of code snippets, little bits of code t… more »

Quick Average Request Time from Apache access_log

First, you'll need to add the time required to deliver the request into the access_log. In this case, a custom_log is created. Note the bolded ^%D at the end, which will deliver the time required to serve the request in milliseconds (http://httpd.apach… more »

ErrorDocument * index.php

Using a site's home page as an error document is a good way to prevent people and 'bots from learning more about the site architecture. Routing all error requests to the home page, or some other page, will reduce information leaks, such as 'file not fou… more »