Hacker News new | ask | show | jobs
by igorguerrero 693 days ago
Yeah this makes it better, but I've found some sites that don't do that, blogs and news articles where it's impossible to find the date of published... Is it a SEO trick to make your content always relevant?
1 comments

Well it will definitely help with caching. You only need to update the article every year or so.
That's still more than just using an exact date that never needs to be updated. Also that seems like something you would do client side anyway. ie. you send a timestamp that never changes and then have the client convert it to "X years/days ago."
Most people render the html on the server side and then you can just cache it wholesale.

You could cache the page itself or even the article itself (I'm not talking about browser cache, I'm talking about caching on the web server).

The idea being that you don't have to keep rendering or even hitting your DB for the content you just have a html fragment that you create once and cache and then serve. You'll only need to rebuild the content when the date expires so when "one year ago" becomes "two years ago" .