Solved

cookies/MSIE

Posted on 1997-04-27
1
273 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 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