.htaccess tutorial

htaccess Elite


Using defaultcharset and defaultlanguage to eliminate meta

How to Cache, and Optimize your sites and servers

Using defaultcharset and defaultlanguage to eliminate meta

New postby produke » 27 Sep 2006 07:33

Instead of using meta lines to give your pages a charset like utf-8 or iso-9660, use this:
Code: Select all
AddDefaultCharset utf-8


Instead of using meta to specify the language, use this:
Code: Select all
DefaultLanguage en-us


To make sure the headers only get sent with html and php files, (instead of sending a charset and language with every file served) do this:
Code: Select all
<FilesMatch "\.(html|htm|php)$">
AddDefaultCharset utf-8
DefaultLanguage en-us
</FilesMatch>
User avatar
produke
 
Posts: 242
Joined: 25 Sep 2006 04:48

Return to Caching and Optimizing