473,686 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cookie testing

I need to revisit cookie testing. On the home page and every product page I
write a cookie. I do this because some users enter by direct links to
product pages.

<%
Response.Cookie s("cookietest ") = ("49")
Response.Cookie s("cookietest") .Expires = Date + 2
%>

On the cart page I test for the cookie...

<%
If Request.Cookies ("cookietest ") <"49" Then
Response.Redire ct("err.asp?e=1 ")
End If
%>

I have a user that insists he has cookies enabled, yet he keeps getting
redirected to my error page which suggests he does not have cookies enabled.
What could cause this? Is the above too simple for all circumstances?

Is there more extensive code that I could setup on a hidden page where I can
send users to get read out on how they actually have their browsers setup?
i.e. Run a test on their browser and the results are emailed to me.

thanks!
Aug 30 '06 #1
1 1373
Jay
Whenever i use cookies, i ues this....
Response.Cookie s("cookietest ") = "49"
Response.Cookie s("cookietest") .Expires = Date + 2
Try that, it might help i hope
James Jones


"shank" <sh***@tampabay .rr.comwrote in message
news:OB******** ******@TK2MSFTN GP04.phx.gbl...
>I need to revisit cookie testing. On the home page and every product page I
write a cookie. I do this because some users enter by direct links to
product pages.

<%
Response.Cookie s("cookietest ") = ("49")
Response.Cookie s("cookietest") .Expires = Date + 2
%>

On the cart page I test for the cookie...

<%
If Request.Cookies ("cookietest ") <"49" Then
Response.Redire ct("err.asp?e=1 ")
End If
%>

I have a user that insists he has cookies enabled, yet he keeps getting
redirected to my error page which suggests he does not have cookies
enabled. What could cause this? Is the above too simple for all
circumstances?

Is there more extensive code that I could setup on a hidden page where I
can send users to get read out on how they actually have their browsers
setup? i.e. Run a test on their browser and the results are emailed to me.

thanks!

Aug 30 '06 #2

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

Similar topics

7
3369
by: Henry Hartley | last post by:
I've got a PHP system working on a development server (Windows 2000/IIS5/PHP 4.3.3) but it doesn't seem to be working quite right on the testing server (same except PHP 4.2.3). I upgraded the PHP on the testing server but that didn't seem to make any difference. One difference I noticed is that on the dev server, the session cookie is modified on EVERY page load. On the testing server the cookie gets created alright but it doesn't seem...
5
3550
by: vishal | last post by:
hi i am using session in php. but if the client has disabled his cookie then will my session work or not????????? thxs for your reply in advance.............
6
2193
by: Ajay | last post by:
hi! i am printing a simple cookie, but instead of printing um=name:blah&access:admin&exp:2312390.909 its printing um="name:blah&access:admin&exp:2312390.909" why the quotes?
12
2497
by: George Hester | last post by:
I have always used this in ASP to test if the client is accepting cookies: <%@language="VBScript"%> <% Session ("nc") = 1 If Len(Session("nc")) = 0 Then 'Cookies Off Else 'Cookies On End If
8
1570
by: krisrajz | last post by:
Please observe the pages below: session1.asp <% Session("test")="TESTING" Response.Redirect "session2.asp" %> session2.asp
2
366
by: Athmaus | last post by:
I have a techincal support form. And when the user hits submit i want to give them a cookie. When they try to access this page again in a 24-48 hour time I want the page to identify the cookie and redirect them to an alternative page. Yet i am having a problem with the page. Here is my code for the to give the cookie: Dim prod prod = "test"
4
3812
by: socialism001 | last post by:
I'm trying to store a value in a cookie but its not working. Can anyone see what I might be doing wrong. Thanks, Chris ~~~~~~~~~~~~~~~~~~ <script language="javascript"> if(document.cookie.indexOf("beenHere1=true")!=-1) else
0
1206
by: Bennett F. Dill | last post by:
Thanks for reading. I'm having problems with cookies from asp to asp.net and back! 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 anything to do with it. Can someone please help! The code below, going from aspx to aspx, works great the cookie as expected goes from qwerty to zxcvb and back. As soon as you hit the asp page, the cookie goes to asdfg and stays there...
3
2038
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 anything to do with it. Can someone please help! The code below, going from aspx to aspx, works great the cookie as expected goes from qwerty to zxcvb and back. As soon as you hit the asp page, the cookie goes to asdfg and stays there no matter how...
2
2849
by: kelly.pearson | last post by:
Is this a bug? I am trying to write a cookie that can be accessed by various .Net applications on our domain. However, whenever I add the domain property to the cookie, no errors get thrown but the cookie doesn't get written. I am trying this from my localhost using vs2003, .net framework 1.1, windows xp prof. Sample code I am testing with is below. Public Class WebForm1 Inherits System.Web.UI.Page
0
8585
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8934
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8770
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6441
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2947
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.