Display Last Deploy Date into the application

Hi everyone,

We would like to display the date of the last Netlify deployment into our application so that our users feel like the app is being updated frequently. Something like “updated 17 minutes ago”.

How could we do that?

Thanks for your help,

Andréas

@mcyouks The precise implementation would depend on how you’re doing things, but the general idea is that as part of your build you would either just get the time as indicated by the build server (which you could convert to another timezone if you wished), and output it as “Updated at X time/date”.

Alternatively if you wanted a live updating counter to represent something like “X minutes ago”, then you would need to use a JavaScript based display and with those you can generally seed them with the time from which they should count up/down.

Just be aware that if you’re working with a traditional site, with thousands of pages, and you have this kind of “unique value” on every build, then you don’t get the advantage of previous pages having already been deployed, you end up having to deploy every page to the CDN every single time.

1 Like