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
1 answer

How my browser extension can periodically refresh file from GitHub rawcontent?

In background.js, my browser extension periodically fetches a JSON file published in a GitHub public repository. Now I want it to be nicer to GitHub and its bandwidth limits, and only fetch file again if it was modified since last…
0
votes
2 answers

How can I reload a python class if file is changed on disk?

To support runtime changes of parameters stored in source class file and used as an object with fields, how can I check if the source file for the object was modified since runtime started or since the last time it was reloaded, and reload the class…
tobi delbruck
  • 301
  • 2
  • 9
0
votes
1 answer

"If-Modified-Since" Header?

I wanted to know how to check the server response of "If-Modified-Since" header sent by my browser. I am not sure how do I achieve it. Any help would be a great deal to me, Thanks.
Nihilarian
  • 1,190
  • 1
  • 10
  • 17
0
votes
1 answer

Would a page modified twice within the same second break If-Modified-Since?

From my understanding of the caching mechanism, the response header Last-Modified, request header If-Modified-Since and etc has accuracy to the second, i.e. If-Modified-Since: Wed, 21 Oct 2015 07:28:00 GMT, and thus subsecond modifications would…
T Tse
  • 786
  • 7
  • 19
0
votes
0 answers

Firefox always caches when Last-Modified header is set

I am trying to implement browser caching using If-Modified-Since headers in my Flask application. During normal navigation (as in, clicking a link, rather than a hard refresh), Firefox caches the page rather than making the HTTP request. This means…
poundifdef
  • 18,726
  • 23
  • 95
  • 134
0
votes
1 answer

Conditional GET ignored with fetch API

I am fetching and parsing an RSS feed (https://www.mangaupdates.com/rss.php) with Discord.js/Node.js. I'm currently trying to add a conditional If-Modified-Since header to make a conditional GET request to the RSS feed. Here is my…
0
votes
1 answer

imageresizer if-modified-since support

I'm trying to figure out why does imageresizer returns "HTTP/1.1 200 OK" and not "HTTP/1.1 304 Not Modified" status code when performing If-Modified-Since, Contrary to request without imageresizer which returns "HTTP/1.1 304 Not Modified" as…
yarone
  • 111
  • 3
0
votes
1 answer

Java web server compare if-modified-since with last modified

I am trying to make a Java web server that will compare the if-modified-since with the file's last modified. However, I don't know how to get the if-modified-since header from the client and do the comparison.
AustinL
  • 23
  • 1
  • 6
0
votes
2 answers

Image reload prototype if-modified

I use prototype on the client side. I need to change picture on the page without reloading. So in my .js file I change the src of a picture and it works ok. But I also need that if the same image requested, it would alse request the server to know…
Jura
  • 1
  • 1
0
votes
0 answers

Passing If-Modified-Since in a web request request header

In one of the API which I am trying to consume I am required to pass If-Modified-Since in the format of 2019-07-25T15:26:49+05:30. The Property for passing If-Modified-Since is DateTime in C#. How can we pass the parameter in the format with…
Dilip Nair
  • 61
  • 1
  • 7
0
votes
1 answer

akka-http on web server getFromFile results in 404s on refresh

I'm using akka-http for my React-based single page application's web server, and having issues where when I refresh my website. I get back a 404 for the requested resource (just index.html). Doing a "super refresh" (ctrl + refresh) works fine and…
CustardBun
  • 3,457
  • 8
  • 39
  • 65
0
votes
1 answer

Sending an "if-modified-since" header in the request

I am new to working with the Rest API in Java. I am trying to implement if-modified-since request and got stuck with questions: Client sends a get request and the server responds with a resource and a Last-Modified header. From then on, client…
rav
  • 247
  • 1
  • 6
  • 17
0
votes
1 answer

If-Modified-Since not considered while using httr GET?

My requirement/objective: I'm retrieving Facebook posts for the past 3 months from a public page, and I would like to select only those posts which have been modified in the recent past (in the last 2 days). I'm using httr R package, and using the…
0
votes
1 answer

How can I prevent web browsers from making "If-Modified-Since" requests for cached files?

I'm trying to set up caching in nginx so that images will not need to be fetched repeatedly. It seems to be working except that the browser is still making a request for each file with an If-Modified-Since header. The server then responds with 304…
Ivanna
  • 1,197
  • 1
  • 12
  • 22
0
votes
1 answer

PHP timestamp for if-modified-since with timezone

I have timestamp stored in MySQL in following format: $if_modified_since = date('Y-m-d H:i:s'); The timestamp is saved using server's default timezone which in my case is EST. I need to send a CURL request with if-modified-since…
Ahmad
  • 474
  • 1
  • 4
  • 19