0
weblankan
311d

How to add estimated reading time blog post with out plugin.

Comments
  • 1
    u can attach some triggers to the scroll event like when it's around the start of the post and when reached the last paragraph and measure the time which it took. just an example. there r other methods too ;]
  • 9
    That's a dumb question.. read it yourself and time it.
  • 2
    but then again it won't est. but rather average ;)
  • 4
    And here I am, ignoring estimated time to read and just check the how long the article is lol
  • 3
    @gitpush or just read the TLDR section to decide if it is worth the time 4 full read
  • 6
    I mean, just find out the average reading speed by googling it. The units should be in Wpm (words per minute) and the divide the number of words in your article by that number.

    Apparently the avg is 183wpm so an article of 500 words will take about 500/183 = 2.73 minutes on average. That's 2 minutes and 43 seconds.

    You can measure your own wpm with a stop watch to get results specific to yourself. But if I understand correctly you want to add this functionality to your blog? In which case use the average wpm I gave you. It's like one line of JavaScript, no plugin necessary
  • 2
    It appears to me that websites always show me 1/3 of the actual reading time. Probably so that potential readers are less discouraged by a long read time.

    Technically you might be able to read it within the stated time but you don’t just read articles as fast as you can. You make pauses to think about and understand what you read.
  • 1
    @Lensflare skill issue, get good at reading
  • 2
    @msdsk Soulslike reading!
  • 3
    @msdsk reading is not only about pouring words into your brain. Usually the best part is when you stop and have your individual thoughts.
  • 2
    Just don't. You are wasting time on a metric that has already been ruined by others. Nobody will trust yours to be less a lie that the fake estimates of surveys and news sites.
  • 0
    step 1: google average reading speed (words per minute) and have it in your code as a constant like... AVERAGE_WPM

    step 2: get the amount of words in your text. Doesn't need to be exact. A simple words = text.split(" ") is good enough

    step 3: readingSpeed = Math.ceil(words / AVERAGE_WPM)
Add Comment