Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8995413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:37:01+00:00 2026-06-15T23:37:01+00:00

I have made a login page. When the user logs in a request to

  • 0

I have made a login page. When the user logs in a request to an API is send. This API is PHP and checks the username and password. When both are correct an unique key is send back (this is placed in the database for further use: userid and other stuff needed in the website).
After that key is sent back it is placed in a cookie:

$.cookie("session", JSON.stringify(result));

After the cookie is set I send the user to a new page:

location.href = 'dashboard.htm';

In this page jQuery checks if the cookie “session” is present. If not, the user is send back to the login page.

sessionId = ($.cookie("session") ? JSON.parse($.cookie("session")).SessionId : 0);
return sessionId;

This works fine in Chrome, but IE (8/9) has some problems with this. I figured out that when you get to dashboard.htm the session is present. As soon as I hit F5 the session is gone. And sometimes the cookie isn’t set at all!

I can’t seem to figure out why this is happening in IE. Has someone any idea? Other options/ideas to save that unique key are also welcome.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:37:01+00:00Added an answer on June 15, 2026 at 11:37 pm

    Possible ideas/ list of things you might try. Some information collected over the years!

    You should also make 100% sure your cookie code is not resetting the cookie. I’ve done it and I know others have. We swear its not our code but in the end sometimes it is 😉

    Stay away from special characters in your cookie names like underscores(_) and hyphens(-). IE doesn’t like them and sometimes stuff works and other times it doesn’t.

    Make sure to set the cookie with a very distant expire date. Browsers use the computers local time to see if the cookie is still usable. If the computers date and time are not correct it can cause an issue just like this.

    Make sure your setting the cookies for the correct domain name, I’ve seen people set cookies for path.example.com and then try to access them from bob.example.com. This will not work due to cross domain policy.

    If your trying to access the cookie via Javascript you should make sure you dont have the httponly flag set to true. This flag will 100% prevent any cookie from ever being accessed by Javascript.

    If your settings cookies in an iframe or frameset you will most likely need a P3P policy on your server. You should most likely have one anyone if your planning on supporting IE. For more information visit http://en.wikipedia.org/wiki/P3P

    Example HTACCESS to set P3P Policy:

    <IfModule mod_headers.c>
        Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
    </IfModule>
    

    For a way to monitor your cookies, I would recommend using Chrome’s inspector. Under the Network tab you can click on a request and it will give you some more tabs like a Cookies tab which will allow you to see all the cookies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a web application that uses master page for Login & Logout
I have been trying to make a user login page that, when the user
I have made a login app in android .The user gets logged in after
I have a simple Login page made with JSF 2.0. Usually in every login
I have made a hidden field on login form which contain user timezone and
I have made an application which allows a user to login using their facebook
In my django App on the login page i want to have a request
I have made small web-app in jsp with a start page with login and
I have made an iPhone App which has a loginwithFacebook button , the login
I have made an android app which working fine. I implemented the Login functionality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.