2 Replies Latest reply on Dec 2, 2006 3:06 PM by MikerRoo

    Last-Modified Date

    dempster Level 1
      I've noticed that ColdFusion does not seem to send an HTTP response header for Last-Modified date to the browser. This came up working with a Google mini search appliance, where my cfm pages don't have dates while the html ones do. I confirmed it using the Live HTTP headers add-on in Firefox (a nifty tool, by the way).

      I guess it makes sense that a dynamic page would not have a date like a static html page. Has anyone done things to set this header? Many of the pages I display have dates associated with them (the date of a press release, for example), but I don't know if it would be a good practice to send this out as an HTTP response header.

      Any thoughts are welcome.

        • 1. Re: Last-Modified Date
          two solutions for you
          1) configure your webserver to send an expirey date for cfm files
          2) on your .cfm pages have this line:
          <cfheader name="Expires" value="Mon, 12 Sep 1990 20:53:15 GMT">
          • 2. Re: Last-Modified Date
            MikerRoo Level 1
            We set these headers to take advantage of client caching.
            This really improves the user's experience and cuts our bandwidth needs.

            The only other thing is that you should also monitor for the "If-Modified-Since" header in the request
            and send a 304 response if the file has not changed.

            Attached is a quick and dirty demo.
            In actual practice, the dates and etag are handled by the database.