简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM