JavaScript Local Storage Second Counter

my question is the following: Is it possible to create a second counter using local storage? I mean you load the page, the counter starts counting from 1 one by one. You reload the page at 5seconds, and the counter won’t resets but continues the counting from 5. Is it possible?

I have a code with a simple sec counter, but I don’t know how to make it workable with Local Storage

var seconds = 0;
var el = document.getElementById('seconds-counter');

function incrementSeconds() {
seconds += 1;
el.innerText = seconds;
}



var cancel = setInterval(incrementSeconds, 1000);
<div id='seconds-counter'> </div>

215 thoughts on “JavaScript Local Storage Second Counter”

  1. I’ve been browsing online more than 2 hours today, yet I never found any
    interesting article like yours. It is pretty worth enough for me.

    In my view, if all web owners and bloggers made good content as you did, the web
    will be a lot more useful than ever before.

    Reply
  2. I have been surfing online more than three hours today, yet I by no means found any interesting
    article like yours. It is lovely price sufficient for me.
    In my opinion, if all site owners and bloggers
    made excellent content material as you did, the net might be a lot more useful than ever before.

    Reply
  3. I have been surfing online greater than 3 hours as of late,
    but I never found any fascinating article like yours. It’s pretty
    worth sufficient for me. Personally, if all web owners and bloggers made good content
    material as you did, the net will likely be much more helpful than ever before.

    Reply
  4. It is perfect time to make some plans for the future and it’s time to
    be happy. I’ve read this post and if I could I wish to suggest
    you some interesting things or tips. Perhaps you can write next articles referring to this article.
    I wish to read more things about it!

    Reply
  5. I have been surfing on-line more than 3 hours lately, yet I
    by no means discovered any attention-grabbing article
    like yours. It is pretty price sufficient
    for me. Personally, if all website owners and bloggers
    made good content as you probably did, the web shall be a lot more helpful than ever before.

    Reply
  6. I like the helpful information you supply in your articles.
    I will bookmark your weblog and check once more here frequently.
    I’m moderately certain I will be informed lots of new stuff proper right here!

    Best of luck for the next!

    Reply
  7. Excellent beat ! I wish to apprentice while you
    amend your site, how can i subscribe for a blog web site?
    The account aided me a acceptable deal. I had
    been tiny bit acquainted of this your broadcast offered bright clear idea

    Reply
  8. I was moving a FAT-formatted HDD between my PC and iBook when this happened to me (I forget which direction I was gong at the time – back to my Mac as I recall) – and
    poof” – 400 GB gone in an instant, $200 to recover 90% of it.

    Reply
  9. Hello there! This article could not be written any better!
    Reading through this post reminds me of my previous roommate!
    He continually kept preaching about this. I’ll forward this
    information to him. Pretty sure he will
    have a very good read. Thanks for sharing!

    Reply
  10. I have been surfing on-line more than three hours as of late, but I by no means found any interesting article
    like yours. It’s lovely worth sufficient for me. Personally, if all
    website owners and bloggers made excellent content material as you
    did, the net will be much more useful than ever before.

    Reply
  11. Please let me know if you’re looking for a article author for
    your blog. You have some really great articles and I
    feel I would be a good asset. If you ever want to take some
    of the load off, I’d absolutely love to write some content for your blog in exchange for a link back to mine.
    Please shoot me an e-mail if interested. Thank you!

    Reply
  12. I have been browsing online more than three hours these days, yet I never found any attention-grabbing
    article like yours. It is pretty value enough for me.
    In my view, if all web owners and bloggers made just right content as you did,
    the web shall be much more helpful than ever before.

    Reply
  13. My developer is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using Movable-type on several websites for about a year and am anxious about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can transfer all my wordpress content into it? Any help would be really appreciated!|

    Reply
  14. I really love your blog.. Excellent colors & theme. Did you develop this web site yourself?
    Please reply back as I’m hoping to create my own site and
    would like to know where you got this from or exactly what the theme is named.
    Appreciate it!

    Reply
  15. Pingback: debviagrals.com
  16. Pingback: purchase viagra
  17. Pingback: viagra alternative
  18. Howdy! This blog post couldn’t be written much better!
    Reading through this article reminds me of my previous roommate!
    He always kept preaching about this. I will send this
    post to him. Pretty sure he’s going to have a good read. Thank you for sharing!

    Reply
  19. Pingback: how to buy cialis
  20. I have been surfing online more than 3 hours today, yet I never found
    any interesting article like yours. It is pretty worth enough for me.
    Personally, if all web owners and bloggers made good content as you did,
    the web will be a lot more useful than ever before.

    Reply
  21. Pingback: cialis france
  22. Pingback: sildenafil 50 mg
  23. It’s the best time to make some plans for the future and it is time to be happy.
    I have read this post and if I could I wish to suggest you few interesting
    things or suggestions. Perhaps you could write next
    articles referring to this article. I wish to read even more things about
    it!

    Reply
  24. Pingback: natural viagra
  25. Pingback: cialis sample
  26. I have been surfing online more than 3 hours today, yet I never found any interesting article like yours.
    It’s pretty worth enough for me. Personally, if all website owners and bloggers made good
    content as you did, the internet will be a lot more useful
    than ever before.

    Reply
  27. Pingback: viagra buy
  28. Pingback: 20mg sildenafil
  29. Pingback: cialis cost
  30. Pingback: tadalafil femme
  31. Pingback: tadalafil vidal
  32. Pingback: cheap viagra
  33. Pingback: sildenafil 20mg
  34. Pingback: what is viagra
  35. Pingback: womens viagra
  36. Pingback: viagra walmart
  37. Pingback: female viagra
  38. Pingback: levitra
  39. Pingback: viagra for men
  40. Pingback: viagra pornhub
  41. Pingback: viagra generic
  42. Pingback: viagra pill
  43. Pingback: viagra vs cialis

Leave a Comment