Countdown minutes in Javascript

A simple way to include a countdown on any page.



This script generates a countdown (minutes + seconds). The countdown can persist as the user leaves the page and returns later. Number of minutes can of course be changed.

Note: persistence is "on" for the example above. This means that if you leave the page, the countdown will resume upon return. Also, once the countdown reaches 0:00 it does not restart until you close and re-open the browser (or, delete cookies).)


Use this file with a "script" tag in the page template "<head>" section:

<script type="text/javascript" src="path/to/countdown.js"></script>

NOTE: Target page must have a container element with id "countdown_timer"

That's all.

- countdown 2 mins: Include code below in target page:


Source code

Click "download" link below and the code will be visible


countdown.js (2.1kB) (right-click the link, and choose "Save link/target as...")

Version and License


Current version: 1


What? Free!