Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I need to see the value of a cookie in Safari on an iPhone. How do I do this?

Note that I'm not asking how to delete a cookie, or how to see that a cookie exists. I'm trying to see the actual data stored in a cookie.

For example, on Firefox, I can go to Tools > Options > Privacy > Show Cookies and see the actual data stored in each cookie my browser has stored.

share|improve this question
add comment

3 Answers 3

You can't see cookie data on the phone itself, but if you activate Settings > Safari > Advanced > Web Inspector you can connect the iPhone to an Apple computer with a cable and open Safari. Activate the Develop menu in Preferences > Advanced > Show Develop menu in menu bar

Now you can open a page on the iPhone and then select Develop > your_phone > the_page on the computer to see an inspector for the page on the phone. The second icon at the top is for storage and will show cookies for the page you show on the phone.

Sadly I can't find a way to show all cookies on the phone but if it is for development it is possible to monitor the cookie data.

share|improve this answer
    
What if you don't have an Apple computer? –  Joe Dec 17 '12 at 23:03
1  
I'm unsure if this works on Windows but you can give it a try. I would have done that but not owning a windows computer. –  Hoshts Dec 17 '12 at 23:06
    
@Joe Safari installes on Windows OS as well as Mac OS. You might need another tool or have to run one of the supported OS in emulation if you want to use this method. –  bmike Dec 23 '13 at 13:53
add comment

type the following in your iPhone browser address bar and hit GO

javascript:alert(document.cookie)
share|improve this answer
add comment

The javascript:alert(document.cookie) only shows the site url on safari on ios 6.1.2 on iphone 4S.

Maybe it's due to the fact that it's an https site ?

share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post once you have sufficient reputation. –  George Garside Dec 23 '13 at 12:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.