Javascript Cookies – Can they be accessed by a server side scripting language, visa versa?

I am learning Javascript and have been a back-end Web Developer for 25 years. MY question is quite simple; can you access a cookie set by Javascript with a server side scripting language, such as PHP, visa versa?

Thank you,


Of course. Cookies are data managed by browser, and transmitted on each requests.

Cookies are sent by browsers via http requests, any script / programm can read them server side.

Remember that cookies are linked to domains, and that you can only access to cookies linked to your page domain.

You may want to read :