I am trying to write a PoC in a website. I created a cookie storing some information in domain.com
, and wish that the cookie is also available in app.domain.com/*
. However the MSDN docs about domain
in cookies is not very clear about this. Is that by any means possible using javascript?
document.cookie = `Code=${code.toString()}; expires= #${someDateObj}; path=/; domain=domain.com`
Expected results: After the cookie is made available inside domain.com, when I go to anywhere inside app.domain.com/* and domain.com/* the cookie is still available for fetching.