Further, WPT advices that these “static resources” should be served from a cookieless domain. While I do use a distinct domain for true static resources (CNAMEd to my CDN), these scripts need information from the client in order to properly assemble the returned JSON payload. The data is transmitted to the scripts by both cookies and query string arguments.
So, I am curious how WPT determines what is a “static resource” ?
Here are the Headers returned for one of these Ajax calls:
Date:Thu, 27 Jan 2011 12:46:05 GMT
Last-Modification:Wed, 25 Aug 2010 14:15:20 GMT
my script examines the request header for Accept-Encoding, and returns gzip’d content when possible (which is the case in the Headers above)
the script is returning content derived from a file. I never know when that data will change, and presently it has not changed in a while (the Last-Modification header is the date of the last change to the file). But since it may change, I set the cache max-age to 1 day.