yelp.github.io | open sourced and open source projects | Learning library
kandi X-RAY | yelp.github.io Summary
kandi X-RAY | yelp.github.io Summary
Source code for our opensource site showcasing all of our opensource projects.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of yelp.github.io
yelp.github.io Key Features
yelp.github.io Examples and Code Snippets
Community Discussions
Trending Discussions on yelp.github.io
QUESTION
While on a page on subdomain.foo.com
, I know it is possible to set a cookie in JavaScript with a domain=foo.com
clause (or domain=.foo.com
according to earlier specifications), and have that cookie apply to all subdomains.
When I open up the developer console in Chrome on a GitHub Pages page (say, yelp.github.io
) and try this using a domain=github.io
clause, the cookie doesn't get set (document.cookie
yields the empty string). I only seem to be able to get the cookie to set if I omit the domain
clause, or use domain=yelp.github.io
.
I can understand why GitHub would want to restrict cookie scope this way for security reasons, but I'm not sure how this is actually working or what's behind the behavior I'm seeing. Is there something special about the github.io
domain? Is there a security policy being applied I'm not aware of? Or am I just doing it wrong?
ANSWER
Answered 2017-Nov-21 at 18:16According to the relevant specification (RFC 6265), cookies are rejected for public suffixes if set from a subdomain:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install yelp.github.io
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page