JavaScript Cookie – when it is set?

I am facing problem related to Cookie. I want to know when a Cookie is set, which date? I see there is not way to know when a cookie is set! Am I missing something big?

If a cookie setting statement is there on a page above your code to test cookie then document.cookie can catch that. Therefore, in that case, I am not sure whether the cookie was old one/from earlier visit or the newly set cookie. When I use server-side cookie check then I know if cookie was from earlier visit, but then Server-side code is not always possible. Browser does not send any cookie start date or when it is originally set.

Even if (IF), client-side cookie check does not detect a just set cookie on the same page then also, problem could not have gone completely. In that case, on the same page set cookie can be checked and confirmed that whether cookie is from earlier visit or not but when we want to use external JavaScript file then this solution again would have failed. So, Web Browser should tell us when a cookie is actually set!

Comments are open for an year period. Please, write here on Facebook page.