Practise, Case Studying, and Caveats#
Duplicate Cookie Name Problem#
Above we have stated that cookie name in itself is not distinctive, but rather a member of 3 element group that determines a distinctive cookie entry. We have also shown that with domain scoping there are 2 parts to a domain name – fixed-domain and scoped-domain, which obscures the domain declaration and results in multiple cookie entries that can later be fetched by a single domain declaration. What is more, we have proven that intuitively similar paths (eg.
/dir/) do not cancel each other out, and can also result in multiple cookie entries which can later on be fetched for a single path query.
Let’s assume that our working URL is
Set-Cookie: foo=two; Domain=.domain.com
Set-Cookie: foo=three; Domain=www.domain.com
Set-Cookie: foo=four; Path=/
Set-Cookie: foo=five; Path=/dir/
Set-Cookie: foo=six; Domain=.domain.com; Path=/
Set-Cookie: foo=seven; Domain=.domain.com; Path=/dir/
The response would be the following.
Cookie: foo=five; foo=seven; foo=one; foo=two; foo=three; foo=four; foo=six
The resulting data store.
The data store is sorted by path column in string length descending order, and time entered ascending order.
Let’s see how browsers cope with this issue.
Case Study for Setting and Matching Domain Name#
Other Case Studies and Caveats#