How To Enable If-Modified-Since Apache Web Server With Linux
how to enable if-modified-since apache web server with linux
how, to, enable, if, modified, since, apache, web, server, with, linux
How To Enable If-Modified-Since Apache Web Server With Linux
Post Description: how to enable if-modified-since apache web server with linux
POST# 1028
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: How To Enable If-Modified-Since Apache Web Server With Linux
i want to make my websites faster, i've heard of this If-Modified-Since, how can i enable it so that my site will be able to cached my content? is that possible?


Thu Jul 12, 2007 7:17 pm
1
hostman
Reply #1743
i can only give you this information, im not sure if i understand your question:

Apache HTTP Server
Apache uses optional modules to include headers, including both Expires and Cache-Control. Both modules are available in the 1.2 or greater distribution.

The modules need to be built into Apache; although they are included in the distribution, they are not turned on by default. To find out if the modules are enabled in your server, find the httpd binary and run httpd -l; this should print a list of the available modules. The modules we’re looking for are mod_expires and mod_headers.

If they aren’t available, and you have administrative access, you can recompile Apache to include them. This can be done either by uncommenting the appropriate lines in the Configuration file, or using the -enable-module=expires and -enable-module=headers arguments to configure (1.3 or greater). Consult the INSTALL file found with the Apache distribution.
Once you have an Apache with the appropriate modules, you can use mod_expires to specify when representations should expire, either in .htaccess files or in the server’s access.conf file. You can specify expiry from either access or modification time, and apply it to a file type or as a default. See the module documentation for more information, and speak with your local Apache guru if you have trouble.

To apply Cache-Control headers, you’ll need to use the mod_headers module, which allows you to specify arbitrary HTTP headers for a resource. See the mod_headers documentation.

Here’s an example .htaccess file that demonstrates the use of some headers.
### activate mod_expires
ExpiresActive On
### Expire .gif's 1 month from when they're accessed
ExpiredByType image/gif A2592000
### Expire everything else 1 day from when it's last modified
## (this used the Alternative syntx)
ExpiresDefault "modification plus 1 day"
### Apply a Cache-Control header to index.html
< Files index.html >
Header append Cache-Control "Publich, must-revalidate"
< /Files >


.htaccess files allow web publishers to use commands normally only found in configuration files. They affect the content of the directory they’re in and their subdirectories. Talk to your server administrator to find out if they’re enabled.


Note that mod_expires automatically calculates and inserts a Cache-Control:max-age header as appropriate.
Apache 2.0’s configuration is very similar to that of 1.3; see the 2.0 mod_expires and mod_headers documentation for more information.

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload