Accessing A Cookie's Value Through The Address Bar
Solution 1:
Before the days of Firebug and other browser development tools, I used to type the following into the URL bar to see the sites cookies:
javascript:alert(document.cookie)
So, I just went to google.com, then tried this with Firefox 19, Chrome 26 and Safari 6 on my Mac (OS X 10.8).
Chrome let me type javascript:alert(document.cookie)
, but when I paste it into the URL bar, it stripped the javascript:
and just pasted alert(document.cookie)
, which ran a google search.
Safari alerted the cookies on paste, but Firefox would not allow pasting, nor typing.
Those results were direct user input, and had mixed results. With a link from another site, and all the "cross domain" security issues, this is not going to work. If you think of it, this is really another form of a Cross-site scripting (XSS) attack.
Post a Comment for "Accessing A Cookie's Value Through The Address Bar"