Solved

cookies/MSIE

Posted on 1997-04-27
1
262 Views
Last Modified: 2013-12-25
Setting cookies, which works like a dream in any version of Netscape, works poorly in MSIE, at least using the following format:

$header = "Content-type: text/html\n\n";
$header = "Set-Cookie: adel=$user_id; expires=09-Sep-99 01:00:00 GMT; path=/;\n"."$header";

In some versions of MSIE, the cookie is never set. In
some, it's set, but with the wrong value. For example, if I use this form element and choose Obscene:

<SELECT NAME="linespeed">
<OPTION VALUE=0>Standard (14.4, 28.8)
<OPTION VALUE=1>Impressive (56K, ISDN)
<OPTION VALUE=2>Obscene (T-1, Cable Modem, T-3)
</SELECT>

..in netscape, it works perfectly. In some MSIEs,
I'll get the cookie incorrectly set to Standard.
In other MSIEs, I'll get no cookie at all.

Even in those versions, I know it's possible to set a cookie, because my Apache server sets one.
So how does one set a cookie that's recognized properly
by both NS and MSIE?
0
Comment
Question by:bleak
1 Comment
 

Accepted Solution

by:
bigbison earned 100 total points
ID: 1827949
Hi,
The http and cookie protocols supports two formats for time and date:

  Wednesday, 09-Sep-99 01:00:00 GMT
or
  Wed, 09 Sep 1999 01:00:00 GMT

You forgot the day of the week !

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now