Search For Last-Modified

FREE THOUGHT · FREE SOFTWARE · FREE WORL

  Search Feed

Google

Clusty

Ask.com

Yahoo

Bing

Technorati

mod_rewrite Fix for Caching Updated Files

Web Developers sometimes use file.ext?v=004 as a version control system to force visitors to use updated files. This is terrible. Instead link to apache-003.css and set it to be cached forever. When you change the file you just change the links to apache-004.css. That eliminates millions of bandwidth and resource robbing If-Modified-Since requests. You only need Apache with mod_rewrite, and 1-10 minutes!

Tagged: , , , , , | 2 Comments | Continue...




An AskApache Plugin Upgrade to Rule them All

apache-server-statusSo my blog as been rather quiet for almost a year now, and very few updates if any have been released for my Password Protection PLugin, my Google 404 Plugin, and definately not for my AskApache CrazyCache plugin, which I will be releasing last… So for all of you who’ve helped me out by sending me suggestions and notifying me of errors and sticking with it… Just wanted to say sorry about that, and thanks for all the great ideas.. Well, I’ve been sticking with it as well believe it our not. I manage to get free days once in a while, and then its time to jam.

Tagged: , , , , | 1 Comment | Continue...


Ultimate Htaccess Tutorial for .htaccess files

.htaccess tutorial and htaccess sampleThis is not an introduction to .htaccessThis is the evolution of .htaccess… The BEST, the ORIGINAL, the NEWEST, and the most HIGHEST, FLYEST .htaccess tricks I can find.

Originally known as the “Ultimate .htaccess Guide”, its changed over the years by adding new .htaccess tricks and .htaccess examples to it.. I also add my favorite .htaccess links, the best .htaccess articles on AskApache, the coolest .htaccess experiments, the Web’s best .htaccess hacks, and update this article on the regular.

Tagged: , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 56 Comments | Continue...


Pimp out your FeedBurner Count

I’ve had a lot of people ask about the FeedBurner FeedCount image on AskApache. Specifically how to set it up with custom messages and different colors each page view… It is pretty sweet..

Tagged: , , , | Continue...


Notes from Apache HTTPD Source Code

thought I’d take a break from coding and post about how open-source is such a great tool for finding the best answers to the toughest questions,

/** is the status code informational */
#define ap_is_HTTP_INFO(x)         (((x) >= 100)&&((x) < 200))
/** is the status code OK ?*/
 
#define ap_is_HTTP_SUCCESS(x)      (((x) >= 200)&&((x) < 300))
/** is the status code a redirect */
#define ap_is_HTTP_REDIRECT(x)     (((x) >= 300)&&((x) < 400))
 
/** is the status code a error (client or server) */
#define ap_is_HTTP_ERROR(x)        (((x) >= 400)&&((x) < 600))
/** is the status code a client error  */
 
#define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
/** is the status code a server error  */
#define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
 
/** is the status code a (potentially) valid response code?  */
#define ap_is_HTTP_VALID_RESPONSE(x) (((x) >= 100)&&((x) < 600))

Tagged: , | Continue...


Preloading .flv and .mp3 files with Flash

Preload/Cache .mp3 .flv files with Flash ActionscriptIf you want to pre-load .flv / .mp3 files into a visitors browser cache using flash, here’s the actionscript I use to do it, and some ideas behind a good javascript implementation using swfobject or ufo.

Tagged: , , , | 9 Comments | Continue...


PHP Sessions/Cookies On The Fly

Multiple Web Technologies for dynamic php session controlThis article shows how to save and modify php session data, cookies, do anything really… without using ajax or iframes or forcing the user make a request.

Tagged: , , | 2 Comments | Continue...


Hack WP-Cache for Maximum Speed

WP-Cache with Full AskApache HackIf you desire SPEED from your WordPress blog, the #1 speed improvement comes from using the WP-Cache Plugin. If you still desire SPEED after installing the Plugin, you can modify the WP-Cache Plugin code to make your blog even faster!

2 Comments | Continue...


Speed Tips: Add Cache-Control Headers

Cache-Control Headers OnUsing Cache-Control headers you can specify which types of proxies can cache certain content, and how long files should be cached.

Tagged: , , , | 6 Comments | Continue...


View Detailed HTTP Headers

HTTP Headers

HTTP Header Name
Header Description
Example HTTP Header

Accept
Content-Types that are acceptable
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Charset
Character sets that are acceptable
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Accept-Encoding
Acceptable encodings
Accept-Encoding: gzip,deflate

Accept-Language
Acceptable languages for response
Accept-Language: en-us,en

Accept-Ranges
What partial content range types this server supports
Accept-Ranges: bytes

Age
The age the object has been in a proxy cache in seconds
Age: 7200

Allow
Valid actions for a specified resource. To be used for a 405 Method not allowed
Allow: GET,HEAD,POST,OPTIONS,TRACE

Authorization
Authentication credentials for HTTP authentication
Authorization: Basic UXNrYXBhggRfoopc5NteWFzcw==

Cache-Control
Controls how proxies may cache this object
Cache-Control: max-age=7200, public

Connection
What type of connection the user-agent would prefer
Connection: Keep-Alive

Content-Encoding
The type of encoding used on the data
Content-Encoding: gzip

Content-Language
The language the content is in
Content-Language: en-us

Content-Length
The length of the content in bytes
Content-Length: 5356

Content-Location
An alternate location for the returned data
Content-Location: /index.html

Content-MD5
An MD5 sum of the content of the response
Content-MD5: 1167b9c13ad2b6d3694493fc47976c8

Content-Range
Where in a full body message this partial message belongs
Content-Range: bytes 110-2034/2035

Content-Type
The mime type of this content
Content-Type: text/html; charset=UTF-8

Date
The date and time that the message was sent
Date: Sat, 05 Jan 2008 09:27:35 GMT

Host
The domain name of the server (for virtual hosting)
Host: www.askapache.com

If-Modified-Since
Allows a 304 Not Modified to be returned
If-Modified-Since: Sat, 05 Jan 2007 09:26:12 GMT

Last-Modified
The last modified date for the requested object
Last-Modified: Sat, 05 Jan 2008 09:26:12 GMT

Location
Used in redirection
Location: http://www.askapache.com/

Server
A name for the server
Server: Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2

User-Agent
The user agent string of the user agent
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

List of HTTP Response Status Codes
1xx Info / Informational
HTTP_INFO – Request received, continuing process.
Indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.

100 Continue – HTTP_CONTINUE
101 Switching Protocols – HTTP_SWITCHING_PROTOCOLS
102 Processing – HTTP_PROCESSING

2xx Success / OK
HTTP_SUCCESS – The action was successfully received, understood, and accepted.
Indicates that the client’s request was successfully received, understood, and accepted.

200 OK – HTTP_OK
201 Created – HTTP_CREATED
202 Accepted – HTTP_ACCEPTED
203 Non-Authoritative Information – HTTP_NON_AUTHORITATIVE
204 No Content – HTTP_NO_CONTENT
205 Reset Content – HTTP_RESET_CONTENT
206 Partial…

4 Comments | Continue...


Speed Tips: Use Multiple SubDomains

To make your site even faster, serve certain content from different subdomains. The reason this works is amazingly cool!

20 Comments | Continue...


Speed Up Google Analytics with urchin.js

Update: This article is a bit dated, to get the newest and latest Google Analytics Speed Tips, check out the 3 part update about Hosting, Cookie Domains, and JavaScript Loading and Failproofs

Ever notice that sometimes your sites take a while to load all the way because google’s urchin.js file is taking forever? You may recognize this problem when you see something similar to this in your browsers status bar “Transferring data from google-analytics.com…”

Time To Setup?
4 minutes I got tired of seeing that all the time and so I set up an automated cronjob that runs every 12 hours and downloads the latest version from google, and saves it to my website directory, then I reference /urchin.js instead of http://www.google-analytics.com/urchin.js.. and my site loads a lot faster!
Take a look at the source for this page if you want to see what is going on (look at the bottom)
There are 2 pretty major things that you accomplish by hosting urchin.js locally

You Enable persistant connections
You ensure that the correct 304 Not Modified header is sent back to your site visitors instead of reserving the entire file.

The urch.sh shell script
Create a shell script called urch.sh.. this will be executed every 1/day or 1/wk, whatever you want. The following script removes the local urchin.js, then it wgets the latests version into the local directory.
#!/bin/sh
rm /home/user/websites/askapache.com/z/j/urchin.js
cd /home/user/websites/askapache.com/z/j/
wget http://www.google-analytics.com/urchin.js
chmod 644 /home/user/websites/askapache.com/z/j/urchin.js
cd ${OLDPWD}
exit 0;
Improved shell script
I realized right away that a more modular shell script would be needed.. I admin like 50+ web-sites and it would be stupid to have to type the same block of code 50 times, wget the same file 50 times, etc.. So this version downloads the urchin.js file into a temporary directory, then it copies it OVER the old file for each directory. So 1 GET request…

Tagged: , | 11 Comments | Continue...


Speed Tips: Remove Last-Modified Header

If you remove the Last-Modified and ETag header, you will totally eliminate If-Modified-Since and If-None-Match requests and their 304 Not Modified Responses.

Tagged: , , , , , | 6 Comments | Continue...


Speed Tips: Turn Off ETags

ETags OffBy removing the ETag header, you disable caches and browsers from being able to validate files, so they are forced to rely on your Cache-Control and Expires header.

Tagged: , , , , | 8 Comments | Continue...


Speed Tips: Add Future Expires Headers

With Expires HeaderA first-time visitor to your page will make several HTTP requests to download all your sites files, but using the Expires header you make those files cacheable. This avoids unnecessary HTTP requests on subsequent page views.

Tagged: , , , | 7 Comments | Continue...


Speed Tips: Turn On Compression

mod_deflate disabledUse the Apache module mod_deflate to compress your static .css and .js files, speeding your site up like crazy!

Tagged: , , , | 16 Comments | Continue...


Speed up your site with Caching and cache-control

Caching with .htaccess and Apache will take your website and your web skills to the next level. This is some technical and advanced methods condensed to simple htaccess code examples for you.

5 Comments | Continue...


Speed Up Sites with php Caching

This explains the basic methods to get started caching with php headers

1 Comment | Continue...


HTTP Packet Capturing to debug Apache

This article is a quick and easy HowTo detailing the use of Wireshark or another network sniffing program to debug your Apache .htaccess or httpd.conf files.

1 Comment | Continue...


Caching Tutorial for Webmasters

If you examine the preferences dialog of any modern Web browser (like Internet Explorer, Safari or Mozilla), you’ll probably notice a ‘cache’ setting. This lets you set aside a section of your computer’s hard disk to store representations that you’ve seen, just for you. The browser cache works according to fairly simple rules. It will check to make sure that the representations are fresh, usually once a session (that is, the once in the current invocation of the browser).

1 Comment | Continue...


Speed Up Sites with htaccess Caching

2 awesome ways to implement caching on your website using Apache .htaccess or httpd.conf. Both methods are extremely simple to set up and will dramatically speed up your site!

10 Comments | Continue...


FastCGI on DreamHost

Continue...


Setting charset in htaccess

Learning about charset’s and file types maybe pretty boring, but using .htaccess it can be fun!

16 Comments | Continue...


Web Development Glossary

Web Development / Webmaster Glossary
A | B | C | D | E | F | G | H | I | L | M | N | O | P | R | S | T | U | V | W | X | Z | other glossaries
This glossary defines some of the common terminology related to Apache in particular, and web serving in general. More information on each concept is provided in the links.

Access Control
The restriction of access to network realms. In an Apache context usually the restriction of access to certain URLs.See: Authentication, Authorization, and Access Control

Account
The term “account” is often used synonymously with username here at DynDNS. Both terms describe the name you use to log in to our system. An account is not the same as a hostname, which may be named differently.

age
The age of a response is the time since it was sent by, or successfully validated with, the origin server.

Alias
See cname.

Algorithm
An unambiguous formula or set of rules for solving a problem in a finite number of steps. Algorithms for encryption are usually called Ciphers.
APache eXtension Tool (apxs)
A perl script that aids in compiling module sources into Dynamic Shared Objects ( dsos) and helps install them in the Apache Web server.See: Manual Page: apxs

A Record
An A Record, short for Address Record, allows a numeric ipaddress to map to a more human-readable domain. An A Record may also be referred to as a host or hostname.

Authoritative Nameserver
A nameserver which has been configured to provide answers for a specific domain, rather than simply getting and caching data about domains from other nameservers.

Authentication
The positive identification of a network entity such as a server, a client, or a user.See: Authentication, Authorization, and Access Control
Advisory Committee
An Advisory Committee is a formal advisory…

Continue...


Make phpBB SEO friendly with htaccess

After I optimized the caching for my non-dynamic pages using apache modules mod_headers and mod_expires, I began to learn about phpbb seo..

6 Comments | Continue...




Youtube experiment.. just testing!.. 5 autostarting songs..
My Picks


The love of liberty is the love of others; the love of power is the love of ourselves.
-- William Hazlitt


Newest Posts
Tech Topics
Website Speed Tips Series
  1. Turn On Compression
  2. Add Future Expires Header
  3. Add Cache-Control Headers
  4. Turn Off ETags
  5. Remove Last-Modified Header
  6. Use Multiple SubDomains

Good Causes

The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. Tim Berners-Lee



It's very simple - you read the protocol and write the code. -Bill Joy

HTML | DCMI | GRDDL | XOXO | XDMP | XFN | DOM | XML | XHTML 1.1 Strict | CSS 2.1 | W3C | TLDP | WAI | DISA | ICSI | GIAC | SANS RR | GHOST | DEFCON | NIST | DHS CYBER | NIST | Phrack | GDB | IEEE | GIT | GNU LIBC

↑ TOPExcept where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 License, just credit with a link.
This site is not supported or endorsed by The Apache Software Foundation (ASF). All software and documentation produced by The ASF is licensed. "Apache" is a trademark of The ASF. HTTPD based on NCSA HTTPd

Site Map | Contact Webmaster | Email AskApache | Glossary | License and Disclaimer | Terms of Service