Musicman
Musicman

Reputation: 59

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,

Upvotes: 0

Views: 1777

Answers (1)

mmeisson
mmeisson

Reputation: 673

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 : https://www.w3schools.com/js/js_cookies.asp

Upvotes: 1

Related Questions