1
0
mirror of https://github.com/mbirth/wiki.git synced 2024-09-19 06:23:25 +01:00
wiki.mbirth.de/know-how/development/_posts/2008-07-15-cookies.md

20 lines
754 B
Markdown
Raw Permalink Normal View History

2015-02-25 23:22:00 +00:00
---
created: 2008-07-15 22:08:02 +0200
2022-01-23 17:14:59 +00:00
language: en
layout: redirect
layout_old: default
redirect_to: https://blog.mbirth.de/archives/2008/07/15/domain-cookies.html
2015-02-25 23:22:00 +00:00
tags:
2022-01-23 17:14:59 +00:00
- know-how
- development
- web
- cookies
title: Domain-Cookies
toc: false
updated: 2008-07-15 22:08:02 +0200
2015-02-25 23:22:00 +00:00
---
2022-01-23 17:14:59 +00:00
2015-02-25 23:22:00 +00:00
According to various documentation, the cookie domain has to contain **at least** 2 dots for a browser to accept this
as a wildcard cookie (e.g. `.google.com`) and use this for all sub-domains. So `.foo.bar.com` should work - **should**.
Opera doesn't like it and only accepts it domain-wide if there are **exactly** 2 dots in the domain name. In this case
2022-01-23 17:14:59 +00:00
`.bar.com`. If you use `.foo.bar.com` the string is ignored and the cookie only gets set for the current domain.