Questions tagged [if-modified-since]

If-Modified-Since is a HTTP conditional request header, where last modification date is the condition.

The request header If-Modified-Since is used to conditionally request HTTP resources which have not changed since the previous request.

If the original response was cacheable and contained a valid Last-Modified response header (a RFC 822 datetime), the user agent (browser) may send this datetime with the next request (this is one of the "cache revalidation" mechanisms of HTTP); if the resource was not modified, the server should respond with a 304 Not Modified instead of sending the content body - which is then served from client's cache. This header is only applicable to GET requests.

If-Modified-Since is to Last-Modified as If-None-Match is to ETag.

See RFC 2616 for the official definition.

90 questions
0
votes
0 answers

How could tm_mon from the tm struct in cause a segmentation fault? (C)

I'm writing a program to check if a file in the current directory has been modified after a certain time in Unix. I use: struct tm* clock; // create a time structure struct stat attrib; // create a file…
0
votes
2 answers

Is there a way to check the last time a program was run? (C in Unix)

I'm writing a program/utility in C to find (and then move to a new directory) the files in the current directory that have been modified after the last time the utility was run. What I'm trying to find out is if there is a way to find the last time…
countofmontecristo
  • 381
  • 3
  • 5
  • 15
0
votes
3 answers

IE not respecting expires

IE (7 -10) doesn't seem to respect expires. I opened fiddler and was checking. if the response had a etag then it does a 304 otherwise it does a 200 for the resource which had an expiry in 1 year future. I tried setting last modified as well. it…
0
votes
1 answer

What is a good way to handle a conditional HTTP GET request from the server-side? That is, a GET request containing "If-Modified-Since" header?

I'm trying to control the caching of resources from my server and I have verified that putting the following headers on my HTTP responses causes the browser to cache resources as expected. Cache-Control: must-revalidate, max-age=30 Last-Modified:…
whitestryder
  • 451
  • 5
  • 10
0
votes
1 answer

force a response with the 304 status code

I'm trying to force force a response with the 304 not modified status code using telnet. I don't see a problem with my commands but I'm still having a 200 OK status. telnet lemonde.fr 80 GET /index.html HTTP/1.1 User-Agent: Mozilla/5.0 From:…
user567
  • 3,712
  • 9
  • 47
  • 80
0
votes
1 answer

bad request 400 with Telnet

'm trying to use the If-Modified-Since command in Telnet. I want to get a 304 Not modified statut code. I tried this but it don't work, I get a 400 bad request error telnet lemonde.fr 80 GET /index.html HTTP/1.1 User-Agent: Mozilla/5.0 From:…
user567
  • 3,712
  • 9
  • 47
  • 80
0
votes
1 answer

Read If-Modified-Since header in PHP CGI

My PHP script depends on being able to read the value of the If-Modified-Since header (yes, I know how to do this). It worked correctly when I used PHP as mod_php, but now that I've switched to suPHP (CGI), it appears Apache itself handles requests…
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
0
votes
0 answers

If modified since with (replace www) modrewrite-rule

i only use the my domain http://myDomain.com and not http://www.myDomain.com, so i use this rule RewriteCond %{HTTP_HOST} ^www\.(.*)$ RewriteRule ^(.*)$ http://%1/$1 [L,R=301] my problem is, that i always get an 301 redirect -> even when i visit my…
user2306309
  • 521
  • 3
  • 6
  • 14
0
votes
1 answer

Using If-Modified-Since header for dynamically generated remote files

Our web server regularly downloads images from other web servers. To prevent our server having to download the same image every day even if it has not changed, I plan to store the Last-Modified header when the image downloads and then put that date…
0
votes
1 answer

error while updating a pass

I add a pass with serial 1 to iPod touch , then I add a pass to iPhone 5 with serial 34455. Next, I push a new pass; now I just can update pass by toggling the back of pass. I toggle the pass in iPhone 5, then pass is updated. But when I toggle the…
malinchhan
  • 767
  • 2
  • 8
  • 28
0
votes
2 answers

Using client generated time in the "If-Modified-Since" HTTP header

We are using the "Last-Modified" response header from the server and the "If-Modified-Since" request header for the resource validation. HTTP header definitions states that the "If-Modified-Since" SHOULD contain value received from the server (it…
LeonidVlad
  • 83
  • 8
0
votes
2 answers

How to get If-modified-since working with JQuery/JSON on IE?

I am working with a particularly expensive (in terms of query and also bandwidth), think of it as a catalog of items. However, the catalog also needs to be comletely accurate at all times, i.e. updates to the catalog need to be reflected in…
0
votes
1 answer

jQuery, browser cache, refreshing an image with attr('src', newimage)

I am refreshing images via attr('src', newimage), where newimage may point to one of several images and may already be cached by the browser. Unfortunately the browser cache is being completely ignored when requesting through this method. All images…
0
votes
1 answer

browser don't use if-modified HTTP Request Header field for .php files

I combined all my css files into a .php file to reduce the number of requests for each access to my webpage. I set expiration date header to 1 day after request at my .php file The problem is that the browsers don't use cache for .php files. I mean…
Alireza Mirian
  • 5,862
  • 3
  • 29
  • 48
0
votes
2 answers

If-modified-since header with filters and MVC3

I just saw some examples about implementing the if-modified-since header. I really don't understand how it works very well. I have seen this example and it seems that if I set a date value to the header "Last-Modified", then I will get a value for…
1 2 3 4 5
6