formatting date/time correctly for If-Modified-Since during AJAX call

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cartoper

    formatting date/time correctly for If-Modified-Since during AJAX call

    How does one go about formatting the date/time string correctly to set
    the If-Modified-Since to the current date/time in an AJAX call? I
    know I need something like this:

    request.setRequ estHeader('If-Modified-Since','Wed, 05 Apr 2006
    00:00:00 GMT');

    But I don't know how to actually format the date/time string.
  • GArlington

    #2
    Re: formatting date/time correctly for If-Modified-Since during AJAXcall

    On Feb 18, 2:17 pm, Cartoper <carto...@gmail .comwrote:
    How does one go about formatting the date/time string correctly to set
    the If-Modified-Since to the current date/time in an AJAX call? I
    know I need something like this:
    >
    request.setRequ estHeader('If-Modified-Since','Wed, 05 Apr 2006
    00:00:00 GMT');
    >
    But I don't know how to actually format the date/time string.
    Why do you need to check it against current date/time? It will ALWAYS
    return 304...
    But, you might want to look at dateObj.toUTCSt ring()

    Comment

    Working...