Create a countdown timer with seconds using Javascript code[new script for download]


Create a simple delay timer countdown for the visitors to download a file from your website.  The timer will hold the visitors to wait for some seconds in your webpage and after only the download link appears for downloading the file.  You can customize the number of seconds to wait in your website in the javascript code.

During the waiting time, you can add ads in your pages to show to your user in the download page.  This will increase the impressions.  And also the waiting time will increase the dwell rate in your website (more time spending in your website).

Important Instructions:

1.  Download the Code from the Link below.  The file contains css style, html code and the javascript code.

2.  After downloading the file.  Copy and paste in the page where you want to use the timer code.
3.  You can change the <h1> heading according to your download file.
4.  Paste your download link in the href of this code <a class="button" href="#" (REMOVE THE # AND ADD YOUR LINK IN THE CODE WHERE YOU FIND IN THE FILE)

To make your download link from Google Drive:
  • Upload your file in Google Drive
  • And change your file link privacy from Restricted to anyone with the link. Copy your link, your link looks something like this
  • This is the format of Google Drive download link ->;export=download Paste your file id from your download link in the place of xxxxxxxfile-idxxxxxxx in the above download link format.
  • Now Paste your download link in the address bar and test it.  After testing, paste the link in the <a> tag.

5.  Add your Adsense code  in the place where you find <!-- Adsense Code-->
6.  Now change the count down timer seconds according to your wish.  To Change the seconds -> Change the  number 20 in two places which indicates the time seconds.
var counter = 20; and You can download the file in 20 seconds 
7.  Now save and publish the page.

Working of the code:

When you visit the page the countdown automatically starts.  After the timer finished then the download button appears in the page.  By clicking the download button the file starts downloading.

Content Last Updated on 31th July 2021, 9:00 PM IST

Post a Comment

Previous Post Next Post