For a comprehensive tutorial with ready-to-use PHP code lookup Sebastian's Pamphlets, or query Google for [Save bandwidth costs: Dynamic pages can support If-Modified-Since too].
@kron3r Nonono... the header your server is sending is Last-Modified. The request made by the client may be conditional: if the request contains the If-Modified-Since header AND the modification timestamps are equal (= no modification, since client has the current version), your server should respond with "304 Not Modified" and NOT send the body.
If the condition is not met (= your server has different timestamp), the body is transferred as if no conditional request was made.
how can we know wether or not our web page has if-modified-since so that we update it or it has not so that we let the google crawl it without changing it.
@kisvarosipari web-sniffer (DOT) net - Look for the Last-Modified header in the response. If it exists, click on the date. If it shows 304 Not Modified, then everything works perfectly.
An important tip for webmasters: if you do want caches down the line to revalidate the content they have with that of the origin servers on every request, you should set the Last-Modified but _not_ the Expires header. Also, you should send max-age=0 in the Cache-Control header. For some strange reason, Squid sometimes ignores the must-revalidate and proxy-revalidate attributes. By using my tip, you can benefit from caching but also provide 100% fresh content the entire time.
I'm guessing the Last modification date in an xml sitemap does the same thing.
So if you cannot update the header info as the database changes, maybe updating the "Last modification date" of your sitemap will get Google to re crawl.
But that raises another question, does one overrides the other? If so, which one does Google favor?
@tattoos01 The sitemap's lastmod attribute doesn't have anything to do with the Last-Modified header your server should be sending. Implementing 304 Not Modified is crucial if you want to save bandwidth.
This is a "tasteful" video. =p
nickstout513 1 month ago
This video went viral on Albania
olbywong717c 1 month ago
great clip .. keep it up thanks
tamekawelle 3 months ago
For a comprehensive tutorial with ready-to-use PHP code lookup Sebastian's Pamphlets, or query Google for [Save bandwidth costs: Dynamic pages can support If-Modified-Since too].
SebastianXgib 1 year ago
Comment removed
SebastianXgib 1 year ago
Comment removed
kron3r 1 year ago
@kron3r Nonono... the header your server is sending is Last-Modified. The request made by the client may be conditional: if the request contains the If-Modified-Since header AND the modification timestamps are equal (= no modification, since client has the current version), your server should respond with "304 Not Modified" and NOT send the body.
If the condition is not met (= your server has different timestamp), the body is transferred as if no conditional request was made.
NoirNG 1 year ago 3
Yeah, what @NoirNG said.
kron3r 1 year ago
how can we know wether or not our web page has if-modified-since so that we update it or it has not so that we let the google crawl it without changing it.
kisvarosipari 1 year ago
@kisvarosipari web-sniffer (DOT) net - Look for the Last-Modified header in the response. If it exists, click on the date. If it shows 304 Not Modified, then everything works perfectly.
NoirNG 1 year ago
An important tip for webmasters: if you do want caches down the line to revalidate the content they have with that of the origin servers on every request, you should set the Last-Modified but _not_ the Expires header. Also, you should send max-age=0 in the Cache-Control header. For some strange reason, Squid sometimes ignores the must-revalidate and proxy-revalidate attributes. By using my tip, you can benefit from caching but also provide 100% fresh content the entire time.
NoirNG 1 year ago
This has been flagged as spam show
Thanks ... Really appreciated
hderanga 1 year ago
Comment removed
hderanga 1 year ago
Thanks for your wonderful answers in all videos. Really appriciated!
lillmii3o 1 year ago 5
I'm guessing the Last modification date in an xml sitemap does the same thing.
So if you cannot update the header info as the database changes, maybe updating the "Last modification date" of your sitemap will get Google to re crawl.
But that raises another question, does one overrides the other? If so, which one does Google favor?
Cheers
James
tattoos01 1 year ago
@tattoos01 The sitemap's lastmod attribute doesn't have anything to do with the Last-Modified header your server should be sending. Implementing 304 Not Modified is crucial if you want to save bandwidth.
NoirNG 1 year ago
Actually, "If-Modified-Since" ist part of the client's request header and the server's response should be in the "Last-Modified" key.
theylmdl 1 year ago 14
Toe mo?
I think it is pronounced Tom oh.
chrisybwell 1 year ago
First
genmodo 1 year ago
@genmodo Good for you.
Thank you Matt!
ordiantakeover 1 year ago