{"id":22341775,"url":"https://github.com/weaponsforge/thirdpartycookie","last_synced_at":"2025-06-24T04:05:47.417Z","repository":{"id":126828625,"uuid":"246929469","full_name":"weaponsforge/thirdpartycookie","owner":"weaponsforge","description":"Checks if 3rd party cookies are allowed in client web browsers.","archived":false,"fork":false,"pushed_at":"2022-12-12T05:05:08.000Z","size":54,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-26T09:37:12.665Z","etag":null,"topics":["cookies","express","html","third-party-cookie"],"latest_commit_sha":null,"homepage":"https://thirdpartycookie.firebaseapp.com/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaponsforge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-12T20:56:37.000Z","updated_at":"2020-03-24T18:16:26.000Z","dependencies_parsed_at":"2023-06-18T05:45:55.582Z","dependency_job_id":null,"html_url":"https://github.com/weaponsforge/thirdpartycookie","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/weaponsforge/thirdpartycookie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fthirdpartycookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fthirdpartycookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fthirdpartycookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fthirdpartycookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaponsforge","download_url":"https://codeload.github.com/weaponsforge/thirdpartycookie/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fthirdpartycookie/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601479,"owners_count":23183092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookies","express","html","third-party-cookie"],"created_at":"2024-12-04T08:08:12.318Z","updated_at":"2025-06-24T04:05:47.403Z","avatar_url":"https://github.com/weaponsforge.png","language":"HTML","readme":"## thirdpartycookie\r\n\r\n\u003e Checks if 3rd party cookies are allowed in client web browsers.  \r\n\u003e Inspired by @mindmup's [3rdpartycookiecheck](https://github.com/mindmup/3rdpartycookiecheck).\r\n\r\n\r\n### Prerequisites\r\n\r\n1. Secure web server that runs on https and can host static html files.\r\n2. NodeJS *(optional, if static website is to be run on localhost)*\r\n\t- node version: 10.16.3\r\n\t- npm version: 6.9.0\r\n\r\n\r\n### Content\r\n\r\n- [**Installation**](#installation)\r\n- [**Usage**](#usage)\r\n- [**Live Demo**](#demo)\r\n- [**References**](#references)\r\n\r\n\r\n\r\n## Installation\r\n\r\n1. Clone this repository.  \r\n`git clone https://github.com/weaponsforge/thirdpartycookie.git`\r\n\r\n2. Install dependencies (For localhost viewing only. 3rd party cookies checking won't work from files served on localhost. However, the production app can be used from localhost. See [**Usage**]() for more information).   \r\n`npm install`\r\n\r\n3. Run the localhost server.  \r\n`npm run start`\r\n\r\n4. Load the local website client for more usage information.  \r\n`http://localhost:3001`\r\n\r\n5. (Optional) Upload `check.html` and `complete.html` in a secure web server that runs in https and call\r\n\"check.html\" from there i.e., `https://[YOUR_SECURE_SERVER]/check.html`\r\n\r\n\r\n## Usage\r\n\r\n1. Create an `\u003ciframe\u003e`.\r\n2. Point its `src` to `https://\u003cyour-secure-domain\u003e/thirdpartycookie/check.html`. i.e.,   \r\n`\u003ciframe src=\"https://thirdpartycookie.firebaseapp.com/check.html\"\u003e`\r\n3. Listen for a window \"message\" event that will be issued using `window.postMessage()` from the iframe's child.  \r\n\r\n\t\tvar receiveMessage = function(evt) {\r\n\t\t  if (evt \u0026\u0026 evt.origin === window.location.origin) {\r\n\t\t    if (evt.data === 'MM:3PCunsupported') {\r\n\t\t      console.log('--3RD PARTY COOKIES ARE N-O-T SUPPORTED!!')\r\n\t\t    } else if (evt.data === 'MM:3PCsupported') {\r\n\t\t      console.log('--3RD PARTY COOKIES ARE SUPPORTED')\r\n\t\t    }\r\n\t\t  }\r\n\t\t}\r\n\r\n\t\twindow.addEventListener(\"message\", receiveMessage, false)\r\n\r\n\r\n## Live Demo\r\n\r\n\r\n\u003e **thirdpartycookie**:   \r\n\u003e [https://thirdpartycookie.firebaseapp.com/](https://thirdpartycookie.firebaseapp.com/).\r\n\r\n\r\n\r\n## References\r\n\r\n[[1]](https://stackoverflow.com/questions/3550790/check-if-third-party-cookies-are-enabled) - S.O. check if third party cookies are enabled  \r\n[[2]](https://blog.zok.pw/web/2015/10/21/3rd-party-cookies-in-practice/) - 3rd party cookies in practice  \r\n[[3]](https://javascript.info/cookie) - document.cookie\r\n\r\n\r\n@weaponsforge  \r\n20200313","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fthirdpartycookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaponsforge%2Fthirdpartycookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fthirdpartycookie/lists"}