Welcome to WebmasterWorld Guest from 54.224.121.67

Forum Moderators: phranque

"Last-modified"

what is best practice?

     
1:52 am on Nov 4, 2017 (gmt 0)

New User from CA 

joined:July 9, 2017
posts:19
votes: 0


I have been including a "last-modified" comment statement near the top of the html for each of my pages. I have been using the ISO-8601 format (example : "Last-modified: 2017-11-03T21:21:43-0400"), but my html editor provides other formats,
such as Unix time (example : 1509758503)
and Unix date string (example : Fri Nov 3 21:21:43 2017)
and several conventional formats (like the simple 3/11/2017).

I have been doing this for my own benefit to recognize when I last worked on a page. I doubt any browser uses this information, so I wonder if there is a better method for me to provide this information to users, perhaps in a meta statement or an HTTP declaration. What is the recommended or best practice for this?

Or, perhaps the server automatically provides this info, so I need not worry about others.
2:34 am on Nov 4, 2017 (gmt 0)

Junior Member from CA 

Top Contributors Of The Month

joined:Feb 7, 2017
posts: 166
votes: 12


I notice Google just reindexes my whole site. My server returns 304s "Not Modified" for the ones I didn't change. Maybe there's a better way, so I'm curious.
5:28 am on Nov 4, 2017 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10113
votes: 550


2017-11-03T21:21:43-0400
That is the universal format used by most online: year-month-day-hour-minute-second. Sitemap.xml uses this format.

As far as SE bots, the most supported is cache settings, either at the server or the account level. Page level, it's most convienant to use meta tags.

But in my experience, while SE bots may consider this data, they pretty much do what they are programmed to do.
6:16 am on Nov 4, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:7882
votes: 547


The bots will do what they do, most seeing the server date change for new content. The Last modified date works really well for HUMANS who might view source code. Pick and choose based on use and need as all of them serve the same purpose.

I never include a Last modified in the header and the bots always find the new stuff.
2:27 am on Nov 5, 2017 (gmt 0)

New User from CA 

joined:July 9, 2017
posts:19
votes: 0


Keyplyr and tangor, thanks very much. Your experience is very helpful.
Page level, it's most convenient to use meta tags.

OK, perhaps something like
<meta name='last-modified' content='2017-11-03T21:21:43-0400'>

I will try that. Thanks again.
2:56 am on Nov 5, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14256
votes: 551


My server returns 304s "Not Modified" for the ones I didn't change.
The server can only do this with fully static content. If you've got anything else--even so much as an included php navigation header--the 304 response will no longer be sent, even if the page as such has not been modified in years.

fwiw, Googlebot includes the If-Modified-Since header on about of page requests. Seznam is similar. Bing never seems to send it, Yandex almost never. They've all got other ways of getting the information.
5:39 am on Nov 6, 2017 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11080
votes: 106


the most beneficial thing you can do for human visitors is to have the proper response headers sent for optimal browser cacheing.
this will also be beneficial for many crawlers.

one of the cache-related headers is the Last-Modified HTTP Response header:
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29

however in many cases it is better to Configure ETags:
https://developer.yahoo.com/performance/rules.html#etags
and Add an Expires or a Cache-Control Header:
https://developer.yahoo.com/performance/rules.html#expires

here's more on cache control...
Leverage Browser Caching | PageSpeed Insights:
https://developers.google.com/speed/docs/insights/LeverageBrowserCaching [developers.google.com]
9:16 pm on Nov 6, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 14, 2011
posts:923
votes: 97


I have spent many hours pondering this without success, how to mimic static content on a dynamic page......

.net from memory actually is able to do this, they can alter the last modified headers etags everything but oh so I struggled to do this on Apache.

In the end I gave up but instead used last modified in sitemaps

If anyone has been able to successfully reproduce etags and last modified headers for dynamic pages I would personally be like "we're not worthy".
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members