473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

A Very interesting cookie problem

I think I have a very interesting cookie problem.
I use form authentications on my application. Through out my
application I started using a toggle control that persists its value
for the session using cookies that it writes to on the client side
(using javascript). What happens sometimes it that the application
forces the user back to the authentication page ( the login page). I
suspect this has something to do with the limit on the number of
cookies per site (i read somewhere it being 20 per site and 300 per
client).

Is there a workaround for this situation?
Nov 18 '05 #1
2 1714
Rakesh Roberts wrote:
I think I have a very interesting cookie problem.
I use form authentications on my application. Through out my
application I started using a toggle control that persists its value
for the session using cookies that it writes to on the client side
(using javascript). What happens sometimes it that the application
forces the user back to the authentication page ( the login page). I
suspect this has something to do with the limit on the number of
cookies per site (i read somewhere it being 20 per site and 300 per
client).

Is there a workaround for this situation?


Your forms auth seems to be expiring (or at least ASP.NET thinks so).

Here's the official word from Netscape's site:

There are limitations on the number of cookies that a client can store
at any one time. This is a specification of the minimum number of
cookies that a client should be prepared to receive and store.

* 300 total cookies
* 4 kilobytes per cookie, where the name and the OPAQUE_STRING
combine to form the 4 kilobyte limit.
* 20 cookies per server or domain. (note that completely specified
hosts and domains are treated as separate entities and have a 20 cookie
limitation for each, not combined)

Servers should not expect clients to be able to exceed these limits.
When the 300 cookie limit or the 20 cookie per server limit is exceeded,
clients should delete the least recently used cookie. When a cookie
larger than 4 kilobytes is encountered the cookie should be trimmed to
fit, but the name should remain intact as long as it is less than 4
kilobytes.

Interesting that the least used cookie could possibly be the forms auth
one. That one is checked every page request.....

Are you supposed to have this many cookies from your domain? Are you
sure you're not creating multiple ones yourself when not wanted?

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2
Rakesh Roberts wrote:
I think I have a very interesting cookie problem.
I use form authentications on my application. Through out my
application I started using a toggle control that persists its value
for the session using cookies that it writes to on the client side
(using javascript). What happens sometimes it that the application
forces the user back to the authentication page ( the login page). I
suspect this has something to do with the limit on the number of
cookies per site (i read somewhere it being 20 per site and 300 per
client).

Is there a workaround for this situation?


Your forms auth seems to be expiring (or at least ASP.NET thinks so).

Here's the official word from Netscape's site:

There are limitations on the number of cookies that a client can store
at any one time. This is a specification of the minimum number of
cookies that a client should be prepared to receive and store.

* 300 total cookies
* 4 kilobytes per cookie, where the name and the OPAQUE_STRING
combine to form the 4 kilobyte limit.
* 20 cookies per server or domain. (note that completely specified
hosts and domains are treated as separate entities and have a 20 cookie
limitation for each, not combined)

Servers should not expect clients to be able to exceed these limits.
When the 300 cookie limit or the 20 cookie per server limit is exceeded,
clients should delete the least recently used cookie. When a cookie
larger than 4 kilobytes is encountered the cookie should be trimmed to
fit, but the name should remain intact as long as it is less than 4
kilobytes.

Interesting that the least used cookie could possibly be the forms auth
one. That one is checked every page request.....

Are you supposed to have this many cookies from your domain? Are you
sure you're not creating multiple ones yourself when not wanted?

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
7
by: Christoph Pieper | last post by:
Hi, we've the following problem : We have an asp-application which sets the cookie on first login. The cookie will never be touched during user access. The user can work the whole day, but...
2
by: marshalli | last post by:
Hi: I have a problem with writing cookie from Jacascript. My problem is that I have two server, one is A, and the other is B. (1) I call a aaa.html from A. In aaa.html : ... <iframe...
0
by: francois | last post by:
hello, I am using forms authentication and I would like that my authentication cookie expires after let say 1 minutes (just for the exemple). When I log in in my longon page, the user has to...
1
by: Rakesh Roberts | last post by:
I think I have a very interesting cookie problem. I use form authentications on my application. Through out my application I started using a toggle control that persists its value for the session...
3
by: Ben | last post by:
I'm having problems with cookies from asp.net to asp back to asp.net. It seems like I can set a cookie in asp.net fine, and alter it at will, as soon as asp touches it, asp.net won't have...
3
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code...
6
by: kelvlam | last post by:
Hello all, I'm still a bit new with JavaScript, and I hope the guru here can shed some light for me. It's regarding handling cookie and the case-sensitive nature of JavaScript itself. My...
1
by: flutetones | last post by:
http://67.189.52.24/~metafusionserver/public_html/training.php Here is a link to my server. I have an issue that doen't make sense. What's hapening is this . . . What's going right . . .
5
by: SJ | last post by:
Hi, In my website, i have a cookie that allows the user to remain logged in for upto 90days. So I'm setting the cookie expiration time to 90 days in the future from the time the user logs in....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.