If I view the source code of a loaded web page, is there a time stamp of any sort?
Not unless the page was designed to have one.
Not in the HTML source code, but if you view the HTTP headers of the response that the web page came with, there may be a Last-Modified: header. If the page was generated dynamically the header may be not present or not meaningful.
In Firefox, it’s pretty easy to get to get to that header: just right click on a blank part of the page and choose Page Info.
In Chrome, it’s a rather convoluted to do without an extension. So I just recommend installing an HTTP Headers addon.
Do note that this may not be meaningful, as many sites essentially create a new web page every time you go to them. So the page will always be listed as having been created a few seconds ago.
You can also go to the way back machine and compare it to previous versions.
This is one of those classic XY problems. The OP has decided that finding a timestamp will solve his problem. So now he’s asking us how to find a timestamp.
ISTM it’d be helpful for the OP to take a step back and tell us the problem he’s really trying to solve. The one he assumes a timestamp will be helpful for.
We can probably come up with a more-correct way to solve that problem, whatever it is. Once we know what it is.
Oh hey, so glad to have learned the term for that!!
I read a lot of news on-line, including “related stories” that they often link to – which are often earlier stories (sometimes weeks or months or years earlier) on a similar topic.
And I’ve noticed a distressingly large number of news sites that DO NOT include the date anywhere in the article, at least not that I can find. :mad: WTF? So I’m reading an article about, say, Donald Trump just fired Comey (or, say, some similar item that I’m not already familiar with) and I can’t tell if it’s new news that just happened yesterday or old news that happened months ago. Srsly, I come across this kind of thing quite often.
So I often look at the Page Info as BigT suggests, or even look at the Page Source – and lo! It almost always shows the date/time that I just viewed the page, not the date/time of the article in question.
@LSLGuy – and that, for me, is “the problem behind the problem” – why I want to know the page’s time stamp – What I’m really hoping to find is the timestamp of the news article I’m reading – and the page time stamp rarely actually shows that.
Very often it’ll be in the URL (address bar) for news stories
Agree with your experience. Pisses me right off too.
As to the WTF, IMO it’s pretty simple. A properly dated article can be filtered out by search engines. Reducing the odds on you seeing it and the accompanying ads. By hiding the fact it’s stale news they increase the odds somebody will see those ads.
IOW, it’s actively vandalizing the quality of their own product as journalism and history-in-the-making in the pursuit of an incremental 0.001% of revenue.
We need a snarling Hulk Smash smilie for this one. A mere :mad: doesn’t begin to cover it.
To the folks talking about page info or http headers, the timestamp there is meant, by the standards, to be the time the entire page was created. If any tidbit anywhere on it changes, per the standard it must get a new timestamp.
The intent of the design is that the browser can choose to remember that timestamp. Then later the browser can choose to tell the server “Please give me a fresh copy of page ABC, but only if it’s newer than <old timestamp>”. The server can then reply either “Here’s your new page with its updated contents and new timestamp.” or “No need; you’ve already got a copy of the latest version. Just show your user that one and we’ll save a bunch of bandwidth.”
Which was a great design feature for static pages like the www was in 1993. But is irrelevant today when each and every page served is unique because every advert you see on it was auctioned off in real time to the highest / quickest bidder based on what they all know about you.
It’s kinda scary to hit the e.g. CNN home page, take note of the ads, then visit Amazon and search for some utterly out-of-your-character products, then return to e.g. CNN and see ads for what you just saw at Amazon.
“How long ago did I load this page?” (Not, “when was this page created or last edited”).
Ah. “How long ago did I load this page” is actually “How long ago was this page transmitted to me.” That has nothing to do with the page itself. Therefore, what you’re looking for is not an HTML timestamp, then. HTML is about content, not about transmission. If the page is completely static, an accurate timestamp would be static also (when the page was created or last edited), and not altered on-the-fly by the act of requesting or transmitting it.
HTTP (the actual transport protocol for web-based stuff) does have a Date: header parameter, and that timestamp represents when the HTTP response was formulated (within seconds of request time). You can view this using web developer tools, such as the Firefox web developer console or Internet Explorer’s Developer Tools. But at least for IE you have to be running the Dev Tools network capture before loading the page, you have to pick out the request/response that matches the page you want, and dig into the response HTTP headers to see the Date (as well as the other HTTP fields). Not very user-friendly.:mad:
On the other hand, if the webpage, like so many nowadays, is dynamically generated at the time of request, then the answer Senegoid was hoping would work, would in fact work for Lumpy’s question.