Displaying a cookie's value on a web UI
FIXED- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Displaying a cookie's value on a web UI
23-01-2018 10:46 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am having issues when using this:
https://github.com/js-cookie/js-cookie
Or in fact any method of JavaScript cookie retrieval, I want to display the value of the username cookie on my UI but out of all of the methods I’ve tried I get nothing.
The cookies are set using a Python CGI script as part of the login process, and I can view them in FF via Privacy & Security > Show Cookies so I can’t understand why they’re not displayed on the UI or out to the console.log() with the required code.
Does anyone have any ideas?
If it helps this is an EV SSL enabled site.
Fixed! Go to the fix.
23-01-2018 11:27 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Just reviewed the docs on this one and I was using the HttpOnly setting when I created the cookies and as a consequence they weren't exposed to JavaScript.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Displaying a cookie's value on a web UI