Manually add a cookie in browser session in iE

Multi tool use
Multi tool use


Manually add a cookie in browser session in iE



I want to add a cookie to the browser's session for testing that particular page. I am able to do that in Chrome and Firefox, as there is an option to add a cookie manually in the Developer tools -> Application -> Cookies. But in IE there is no particular way to add a cookie. Is there any way I can do that in IE?. This is what I have tried so far. From suggestions from a few people, I tried to do the following.



1) Use javascript:document.cookie="NAME=VALUE" in the page I want to add a cookie. When I refresh the page, I don't find the cookie anymore.


javascript:document.cookie="NAME=VALUE"



2) Also tried after the page loaded to do document.cookie="NAME=VALUE" in the console.


document.cookie="NAME=VALUE"



Both of the solutions doesn't seem to work. Any help is appreciated.




1 Answer
1



Just add it artificially with javascript declaration document.cookie = "";


document.cookie = "";



Note: This snippet won't work on StackOverflow, because of jsfiddle sandbox mode.




document.cookie = "username=Test Subject";
document.getElementById('showcookies').addEventListener('click', function(){
alert("Cookies JSON:" + document.cookie);
});


<button id="showcookies">Show coowkies!</button>



Alternatively add it in your HTML using the <script></script> tags.


<script></script>



Additionally, check if your version of IE browser has cookies enabled in it's properties.



enter image description here






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Iwo0e,s6 Jn8Docq9GoCMddHIGZsg38g V4vKf73
nF7Wh,ZfeH hZUCw Csg1ZIzgXchXZr8dwAszuE9ryB8x vOf80WNs2s2 eqQY,Q hw qyelgfESjWYj,3KVeZw

Popular posts from this blog

Rothschild family

Cinema of Italy