javascript - how to limit access to strings i save in cookies? -


if website writes string cookies using document.cookie website able read strings or 1 created it? if can read there way limit access string? question in javascript.
edit: have no problem if third party reads cookie shouldn't able edit/delete it. can hacker that?

from within browser, cookie created on a.com available other pages on a.com. cannot accessed pages in other domains. specific design principle of cookies. when create cookie, can separately control whether cookie has path restrictions (it can accessed pages on a.com).

you can control whether sub-domain can access cookie or not such sub.a.com. see this answer details on sub-domain access.

likewise, cookie sent server a.com, not other servers. but, if not using https, should aware cookie being transmitted in plain text on network each time make request of a.com.

cookie data stored browser on user's local hard drive coookie may accessed outside of browser (by local application, not within browser) depending upon browser , os implementation. if want no outside agent able data, (as others have said), keep data on server.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -