473,327 Members | 2,081 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,327 software developers and data experts.

Is order matter in Cookies?

I have one application in two servers, two servers returns the same
cookie but with some elmenet in different order,

Set-cookie: a=abc; Path=/; Domain=.abc.com; Secure

another one is
Set-cookie: a=abc; Secure; Path=/ ;Domain=.abc.com

the later one will not be included in the Cookie list in the later
request. Does anyone knows whether the order of "secure" matter?

Thanks.

Here is the definition copied from RFC 2109.

set-cookie = "Set-Cookie:" cookies
cookies = 1#cookie
cookie = NAME "=" VALUE *(";" cookie-av)
NAME = attr
VALUE = value
cookie-av = "Comment" "=" value
| "Domain" "=" value
| "Max-Age" "=" value
| "Path" "=" value
| "Secure"
| "Version" "=" 1*DIGIT

Jul 21 '06 #1
2 1677
The "standard" order is :
Set-Cookie: NAME=VALUE; expires=DATE;
path=PATH; domain=DOMAIN_NAME; secure

If you don't set an expires date, the cookie doesn't persist.

Why are you setting cookies like that, instead of using Response.Cookies ?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"jacksu" <ja******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
>I have one application in two servers, two servers returns the same
cookie but with some elmenet in different order,

Set-cookie: a=abc; Path=/; Domain=.abc.com; Secure

another one is
Set-cookie: a=abc; Secure; Path=/ ;Domain=.abc.com

the later one will not be included in the Cookie list in the later
request. Does anyone knows whether the order of "secure" matter?

Thanks.

Here is the definition copied from RFC 2109.

set-cookie = "Set-Cookie:" cookies
cookies = 1#cookie
cookie = NAME "=" VALUE *(";" cookie-av)
NAME = attr
VALUE = value
cookie-av = "Comment" "=" value
| "Domain" "=" value
| "Max-Age" "=" value
| "Path" "=" value
| "Secure"
| "Version" "=" 1*DIGIT

Jul 21 '06 #2
It is not persistant cookie. We just used in the same session.

The questions is that if we put secure in the middle of cookie, then it
will not sent out by some software, like HttpUnit, but could be handled
by some browsers like IE and firefox.

Any suggestion?

Thanks.

Juan T. Llibre wrote:
The "standard" order is :
Set-Cookie: NAME=VALUE; expires=DATE;
path=PATH; domain=DOMAIN_NAME; secure

If you don't set an expires date, the cookie doesn't persist.

Why are you setting cookies like that, instead of using Response.Cookies ?


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"jacksu" <ja******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
I have one application in two servers, two servers returns the same
cookie but with some elmenet in different order,

Set-cookie: a=abc; Path=/; Domain=.abc.com; Secure

another one is
Set-cookie: a=abc; Secure; Path=/ ;Domain=.abc.com

the later one will not be included in the Cookie list in the later
request. Does anyone knows whether the order of "secure" matter?

Thanks.

Here is the definition copied from RFC 2109.

set-cookie = "Set-Cookie:" cookies
cookies = 1#cookie
cookie = NAME "=" VALUE *(";" cookie-av)
NAME = attr
VALUE = value
cookie-av = "Comment" "=" value
| "Domain" "=" value
| "Max-Age" "=" value
| "Path" "=" value
| "Secure"
| "Version" "=" 1*DIGIT
Jul 21 '06 #3

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

Similar topics

3
by: Daniel Ruscoe | last post by:
Hi chaps, I'm relatively new to the language, but I want to create a simple order form using PHP and cookies. Please let me know if there's a better way in this situation, database isn't...
14
by: Joerg Schuster | last post by:
Hello, according to http://mail.python.org/pipermail/tutor/2001-July/007246.html the order of function definitions does matter in python. Does anyone know a trick to avoid this? Is there a...
4
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any...
20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
3
by: tshad | last post by:
Does it matter whether Doctype is after the Page line? At the moment, I have my pages as so: <%@ Page Language="VB" trace="false" debug="true" AutoEventWireup="true" ContentType="text/html"...
104
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through...
2
by: the friendly display name | last post by:
Easy to describe that problem: The cookies will be deleted after the user closes the browser, but I have set persistance to true. Code: ------ TicketForPremium = new...
13
by: bevanward | last post by:
Hi All I am finding unexpected results when inserted into a newly created table that has a field of datatype int identity (1,1). Basically the order I sort on when inserting into the table is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.