user3425344
user3425344

Reputation: 3537

Get cookie's create date and time while developing a chrome extension

I am developing a chrome extension for the first time and want to get the createdAt for a cookie.I went through the cookie documentation at https://developer.chrome.com/extensions/cookies.

The cookie object does not have any createdAt field.

Specifically I am trying to read facebook's cookie whose name is "c_user".

And i need to get the createdAt value for that cookie.

Is there any way to get it?

Upvotes: 0

Views: 1340

Answers (1)

Anand Sudhanaboina
Anand Sudhanaboina

Reputation: 885

As far as I know what system stores about a cookie is not the creation date but the expiring date. But if the cookies are set by you you can set another cookie which holds creation time or even you can combine your cookie data to include the creation time.

I've tried this code which will gives you all the cookies but according to cookie spec and the documentation which is next to impossible.

chrome.cookies.getAll(function(cookies) {
	
});

Upvotes: 1

Related Questions