Cookies (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


yaronbb -> Cookies (5/25/2007 14:47:49)

Hi all,
I have a question, how many Cookies can I use in one domain?




rdouglass -> RE: Cookies (5/25/2007 15:33:14)

I don't believe there is a limit but I think it's more of a practical limit you're looking for.

I've used 50-60 cookies once without too much of a problem but they do require resources at the client level.

What specifically are you trying to accomplish and at what volume of users?

Roger D.




yaronbb -> RE: Cookies (5/25/2007 15:40:55)

Hi thanks for the fast replay,
I have a username and password login that use cookies with the sessionid and some other information that I save in cookies.
My problem is that the user name and the sessionid cookies are reseated when opening a new page.




rdouglass -> RE: Cookies (5/25/2007 15:48:38)

Are you setting an expiration date? Unless I want to definitely clear the cookies each time, I will set my expirations to a ways out. ASP code would look something like this:

Response.Cookies("myCookieName").expires = #1/1/2010#

Something like that help?

Roger D.




yaronbb -> RE: Cookies (5/25/2007 15:54:27)

i now that if i dont define the expiration date the cookie will be effective until the claint will close the browser.
untill the next time the claint will log in again




rdouglass -> RE: Cookies (5/25/2007 16:12:48)

So the cookies get reset *everytime* a new window is opened? Regardless of the page?




yaronbb -> RE: Cookies (5/25/2007 16:18:41)

no the resert is rendom not avrey time




rdouglass -> RE: Cookies (5/25/2007 16:41:13)

Are you sure it's random? To be honest, to me it sounds like there may be a 'protection-like' script running on a page that clears a cookie.




yaronbb -> RE: Cookies (5/25/2007 16:47:51)

i didnot put any script to do it.

this si the cookies :

<%response.cookies("Dayar")= session.sessionID%>
<%response.cookies("UserID")= FP_FieldURL(fp_rs,"ID")%>




rdouglass -> RE: Cookies (5/25/2007 16:52:12)

quote:

<%response.cookies("UserID")= FP_FieldURL(fp_rs,"ID")%>


Is that on those pages that lose the cookies when you open new or is that just on a login page?




yaronbb -> RE: Cookies (5/25/2007 16:55:04)

no this is the login.asp

this is the cookies.asp page

<%
if request.cookies("Dayar") = "" then
response.redirect "Default.asp"
end if
%>
<%
if request.cookies("UserID") = "" then
response.redirect "Default.asp"
end if
%>




rdouglass -> RE: Cookies (5/25/2007 17:03:26)

quote:

<%response.cookies("Dayar")= session.sessionID%>
<%response.cookies("UserID")= FP_FieldURL(fp_rs,"ID")%>


So where are those used?




yaronbb -> RE: Cookies (5/25/2007 17:05:58)

this in any page so if some claint will try to go in some page with out login he will go out




rdouglass -> RE: Cookies (5/25/2007 17:25:13)

quote:

this in any page so if some claint will try to go in some page with out login he will go out


I'm sorry but I don't think I'm clear on this statement. Can you clarify that any?

Also, just to double check, are you aware that this:

FP_FieldURL(fp_rs,"ID")

only works inside DRW's?




yaronbb -> RE: Cookies (5/25/2007 17:38:04)


ok first thanks for try to help
I have page name login.asp in this page I create this tow cookies and put the user id and the sessionid

And the other page cookies.asp is in any page and check that this tow cookies are not empty if yes the user must login true the login.asp page if he already logged he can see the pages




rdouglass -> RE: Cookies (5/25/2007 17:59:22)

It looks like you're using a session to do one of the cookies. Why not use them throughout?

To be honest, at the moment I don't know why your cookies are not working. Except for the FP thing in there, I wouldn't know why.




yaronbb -> RE: Cookies (5/25/2007 18:04:31)

Ok again thanks the drw is gust the id value that I am putting in the cookies.

I think I now the problem it is seems that too many cookies was is the some pages and the was reset the other now it is working

thanks




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125