Most Popular
Recently Added
Recently Updated

How do I speed up web page loading and reduce my bandwidth?

Improving Your Web Site Performance Through Better Caching
Below is an introduction to web page caching.

Web Page Caching?
HTTP headers give "you" control on how your pages are cached in a reviewing web browser.
HTTP headers are sent by the server before the HTML, and only seen by the browser and any intermediate caches.

Managing your web pages using HTTP headers is fairly simple.

A simple text file placed in your public_html directory, named .htaccess can be used to manage page caching.

You may already have an .htaccess file set up in your public_html directory. Check first before overwriting.

Otherwise, create a "text" file on your local computer and name it: .htaccess

Add the following text below to your .htaccess file. Notes:
  1. The "#" and text on the same line can be removed. This text is included to explain the line above it.
  2. You can be imaginative with this. Add or delete lines as necessary. For example, if you only wish to ensure .gif images are cached for only 7 days then only include the ExpiresByType image/gif "access plus 7 days" line.

ExpiresActive On # This line required. ExpiresDefault "access plus 1 day" # Tells the browser to expire all pages in 1 day, unless defined below. ExpiresByType image/gif "access plus 30 days" ExpiresByType image/jpg "access plus 30 days" # If your images rarely change consider setting this to more days.  

Properties ID: 000095   Views: 2358   Updated: 13 years ago
Filed under: