Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just upgraded from a dev version of 2.7 to v2.11, and this warning started appearing in my status report. Upgraded to the latest -dev of HTTPRL at the same time. Drupal version is 7.38.
This site confirms the diagnosis: https://www.feedthebot.com/tools/if-modified/
I found the previous issue relating to this warning from two years ago: https://www.drupal.org/node/2143131
The suggestions made there haven't helped. The patch won't apply (not surprised) and there is no Header unset Last-Modified line to remove from .htaccess.
Any other suggestions?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#3 | advagg-2510566-2-etag-test.patch | 6.35 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedThe Last-Modified header is needs to be set in order for it to work.
I should look into setting etags as well and testing; as that will give a 304 as well.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThat advice only is given because that string was found inside the .htaccess file. Code in question
Also see if any updates need to be ran. I have some updates that remove this from the htaccess file when coming from an older version of advagg.
Patch adds in etag support.
Comment #4
millionleaves CreditAttribution: millionleaves as a volunteer commentedThanks. The patch adds the etag check which generates a similar warning in the Status Report.
I guess what's unclear to me is - what adjustment needs to be made to the .htaccess? Searching around for Last-Modified indicates that ModExpires needs to be enabled, which it is. ExpiresActive is present in the .htaccess. What else needs to be done - or - am I on the wrong track?
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedcss htaccess
js htaccess
This will use Etag as well as Last-Modified. Hopefully one of them (Etag, Last-Modified) works for you.
Comment #7
pedrospI have (twice actually) the same warning on Status report, using Advagg 7.x-2.14, or last dev as of today.
My config D7.38 and Nginx/1.8.0 (a-la-perusio):
"Adv CSS/JS Agg - If-Modified-Since The If-Modified-Since (Last-Modified) header is being ignored by your web server.
The web servers configuration will need to be adjusted. The server should have responded with a 304, instead a 200 was returned."
However, when tested with https://varvy.com/tools/if-modified/ (Does your webpage support the 304 If Modified Since HTTP header?) the answer is YES.
This tool checked your HTTP headers and received this response ... Last-Modified: Wed, 05 Aug 2015 07:07:19 GMT
Tool then rechecked looking for if modified since support and found it... Server Response HTTP/1.1 304 Not Modified
Any clues ? Maybe the status report is not having this response asking from localhost instead of "external" ping ?
Thanks.
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedComment #9
mikeytown2 CreditAttribution: mikeytown2 commentedpedrosp
Looking into this more and can you open up a new support request for the issue you are having?
Comment #10
pedrospDone #2546564: Adv CSS/JS Agg - If-Modified-Since warning but 304 is delivered.
Thanks.