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 8370697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:58:31+00:00 2026-06-09T13:58:31+00:00

I have a web application (ASP.NET MVC3) which uses the jquery ui tab control

  • 0

I have a web application (ASP.NET MVC3) which uses the jquery ui tab control with the cookie plugin (as demonstrated here).

I set the path of the cookie using the path option when the tab is created:

$("#tabs").tabs({ cookie: { path: '/A/' } });

In firefox this works correctly. No matter what the url is after “/A/” (ex “A/B/C”) the tab control always correctly remembers which tab was last selected and switches to it when I re-load the page.

However, on Chrome (v21), occasionally the browser will add another tab cookie with a different path. I then end up with two cookies, one with the path “/A/” as I originally created, and another one with the path “/A/B/” which is the url I am currently on. Unfortunately, it seems that this “double cookie” causes the wrong tab to sometimes load when the page is refreshed, since the two cookies seem to conflict.

Is there any way to prevent this behaviour in chrome? I’ve tried several programatic solutions (such as forcing the path to “/A/” if the path contains “/A/”, but as that code is never reached it seems chrome is doing it automatically).

Thanks for the help!

Seems the problem was that chrome doesn’t differentiate between cookies with the same name on different paths; so the other tab control I had in my application was messing things up. Once I gave the cookie a unique name things started working properly!

  • 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-09T13:58:32+00:00Added an answer on June 9, 2026 at 1:58 pm

    I’ve just pushed an example to the GitHub repository.
    Seems it’s working well in my Chrome 21 under Linux.

    Screenshot of first path

    Screenshot of second path

    If you’re using jQuery UI >= 1.7 then add property “name” with some unique value like “my-absolutely-unique-cookie” to your cookie object you’re passing and look how it goes:

    $("#tabs").tabs({
        cookie: {
            name: 'my-unique-cookie',
            // store cookie for a day, without, it would be a session cookie
            expires: 1,
            path: '/tabs'
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an ASP.NET MVC3 Web application which runs perfectly inside the Visual
I have a asp.net MVC3 web application in which i search for a certain
I have an Asp.Net MVC3 web applications, which uses Areas. When I run it
I am working on a web application (asp.net mvc3) I have a Main div.
This is about asp.net mvc3 web application. We have used Object cache to store
We have a Web application (ASP.NET) which displays in some page links to miscellaneous
I have a Web Application (ASP.NET C# for .NET 3.5) that uses the Session
I have an ASP.Net MVC3 web application written in C#. I have one ActionResult
I have a web application which was using Asp.net MVC2 . I Upgraded it
I have an MVC 3 application which uses asp.net authentication. I have just created

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.