PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Specifying a last-modified date for your web pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Specifying a last-modified date for your web pages

    I was looking at the Date options. I currently have a bunch of in meta information like this:
    <META NAME="DATE" CONTENT="01-Jul-1999">

    Which from what I can tell does not work because I need it in your format and was able to get it to work that way by just replacing that with the format from section 7.7 in your guide. What I do not understand is if I remove this meta information on a static page it will not get the file mod date. Do I need to setup something special on my web sever? Win 2003.

    Looking at your PDF documnets:
    This normally uses the last-modified date
    and time of the file according to the file system. However, this may not be very useful in cases such
    as dynamically generated web pages (where it would use the date and time of the server-side script
    as opposed to a date that is related to the content actually displayed).
    Also if I purchased the SDK to modify the cgi search would I be able to reformat the order of the results of the search? Example the location of certain information, how the date is formated on the results page. I was able to figure you can style it differently with the current version but looking more at just layout location.

    As always Thanks

  • #2
    Yes the date must be specified in the standard format, e.g.
    <meta http-equiv="Last-Modified" content="Sat, 07 Apr 2001 00:58:08 GMT">

    If no Last-Modified meta tag is on the page, then it is up to the server to decide what date and time to give to the page. This information is returned in the Last-Modified field of the HTTP protocol header.

    Quoting from the specifications,
    "The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. For files, it may be just the file system last-modified time. For entities with dynamically included parts, it may be the most recent of the set of last-modify times for its component parts. For database gateways, it may be the last-update time stamp of the record. For virtual objects, it may be the last time the internal state changed.

    An origin server MUST NOT send a Last-Modified date which is later than the server's time of message origination. In such cases, where the resource's last modification would indicate some time in the future, the server MUST replace that date with the message origination date.

    An origin server SHOULD obtain the Last-Modified value of the entity as close as possible to the time that it generates the Date value of its response. This allows a recipient to make an accurate assessment of the entity's modification time, especially if the entity changes near the time that the response is generated.

    HTTP/1.1 servers SHOULD send Last-Modified whenever feasible."

    We have not carefully studied the bahaviour of W2003 in this regard and without knowing more details (like if this is a ASP file or HTML file) and what behaviour you are observing it is hard to comment in more detail.

    Comment


    • #3
      Regarding the SDK, yes, if you purchase the SDK you get the CGI source code.

      If you can modify the existing CGI behaviour then depends largely on your skill as a programmer. The code is in C/C++.

      In some cases you can get enough layout control using the search_template.html file and CSS layout code. But it is true, you can't re-format the date field using CSS.

      Comment


      • #4
        Thanks for the information. Will look more into the settings for the server settings to see if i can get the Date to work correctly.

        Comment


        • #5
          I figured out the reason and that is because the the file Extension.

          HTML has the last-modified date and HTM does not.

          Doing a server header check on www.mydomain.com/index.html I get:-

          HTTP/1.1 200 OK
          Date: Fri, 04 Jul 2003 08:45:24 GMT
          Server: Apache/1.3.27
          last-modified: Wed, 25 Jun 2003 08:39:12 GMT
          ETag: "27ea36-9987-3ef95fb0"
          Accept-Ranges: bytes
          Content-Length: 39303
          Connection: close
          Content-Type: text/html

          But for www.myotherdomain.com/index.htm I get only

          HTTP/1.1 200 OK
          Date: Fri, 04 Jul 2003 09:22:44 GMT
          Server: Apache/1.3.27
          Connection: close
          Content-Type: text/html

          Comment


          • #6
            Just to clarify, this is dependent on your Apache server configuration, and is not limited to the file extensions used.

            And for our other readers, the following website is a convenient way to check your HTTP headers:
            http://web-sniffer.net/
            Last edited by Ray; Oct-29-2007, 11:49 PM.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              Not running Apache just IIS 6 on WS2003 but I am sure Apache is more flexible with what can be sent in the headers. From the research that I did could not find any way to change how the header information is setup for II6 when it relates to and HTM vs HTML page.

              Comment


              • #8
                That's not true according to the headers you gave us above:

                Originally posted by chriscsanyi View Post
                HTTP/1.1 200 OK
                Date: Fri, 04 Jul 2003 08:45:24 GMT
                Server: Apache/1.3.27
                last-modified: Wed, 25 Jun 2003 08:39:12 GMT
                ETag: "27ea36-9987-3ef95fb0"
                Accept-Ranges: bytes
                Content-Length: 39303
                Connection: close
                Content-Type: text/html

                But for www.myotherdomain.com/index.htm I get only

                HTTP/1.1 200 OK
                Date: Fri, 04 Jul 2003 09:22:44 GMT
                Server: Apache/1.3.27
                Connection: close
                Content-Type: text/html
                Are you sure you are looking at the header response of the server you are expecting? Perhaps you have two web servers running on the same machine? (You can have both Apache and IIS running on different ports).

                It is certainly possible to configure your IIS server to return a last-modified header for .HTM pages, just as it does for .HTML pages. We have seen many default IIS servers that do this (including our own test IIS servers installed with default configuration).

                But this is an IIS configuration issue and we do not have enough information (nor are we the right people) to solve this issue. Perhaps you have .HTM setup to be handled differently from your .HTML files? I would recommend referring to IIS documentation for more information.
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment

                Working...
                X