What is the meaning of using "days*24*60*60*1000" in cookie?

cookies

Solution

Basically, 1000 is used here just for converting seconds to milliseconds.

Number of seconds in a day = 24 * 60 * 60 = 86400 seconds.

1 second = 1000 milliseconds.

So after calculating the expression, the result is in milliseconds.

days * 24 * 60 * 60 * 1000 = days * 86400000 ms

Problem

What is the meaning of using `days` * `24` * `60` * `60` * `1000` in a cookie? I've seen it quite a lot and I don't understand what it means. I need to create a function that reads the cookie and puts the value in a text box while uploading the page. ``` <body onload="readCookie()"> ```

Original source