Does ie11 ignore cookies from site that uses the s

2019-09-03 20:48发布

问题:

I honestly don't know how to properly give a title to this question so please read the post before making any violent reactions.

I'm currently testing the app to the 3 main browsers, Chrome, Firefox and IE. The app works great on Chrome and Firefox except for IE. What happens is after I logged in, I will be redirected to the home page, then after 10-15 seconds, I will be redirected back to the login page again. When I checked the session cookie, The session expiry set to the cookie is current time, so for example it is already 6:20 PM on my clock, the value of the expiration of the cookie is 6:20 PM also. This explains why I get kicked out of the home page.

This is weird because i set the session timeout to 3 mins and it was set correctly on the cookies sent to Chrome and firefox.

Now, I've read this article that states that IE has issues with cookies depending on the domain name.

Currently, the app that I'm working on ddoesn;t have a domain name yet and I'm using the IP address of the server to access the app. Is it the reason why my app doesn't run correctly in IE11??

回答1:

I found a post from stackoverflow that made me realize that the problem in my app has something to do with the time. Currently, my server has the settings UTC +00:00 while my laptop's settings is UTC +08:00. I tested if my application will work if I adjust the time of my laptop and make it the same as the server. And yes it did! So the answer to this post is no. IE does not accept cookies from certain domain names ,but if you're using the IP of the server to access your web app, there's no need to worry.

Here's the post.

Hope that this will help others somehow.