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()">
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With