Home > Articles > Web Services

Like this article? We recommend 

Usage Guidelines

To use the Caching Library in your web page, follow these steps:

  1. Download the code and include it in your ASP page.
  2. In each library included in your ASP page, set the library modification date, similar to the code in Listing 1.

    Listing 1 Set library modification date.

    SetLastModified DateSerial(2006,10,01)
  3. If your web page relies on content in an external file, check that file’s modification timestamp (see Listing 2).

    Listing 2 Set external file-modification date.

    SetLastModified getFileModifiedDate(Server.MapPath("path-to-file"))
  4. Check the modification date/time of the current script (see Listing 3)./p>

    Listing 3 Set script-modification date.

    SetLastModified getFileModifiedDate(getCurrentScript())
  5. If you’re not forcing revalidation on each request, you might want to set the expiration date. (See part 1 of this series.)
  6. Call the CheckModifiedDate subroutine. In Listing 4, forced validation is disabled, content can be stored in public caches, and no entity tag is associated with the content.

    Listing 4 Check the conditional GET parameters.

    CheckModifiedDate LastModified,False,False,Null

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.