Solved

cookies/MSIE

Posted on 1997-04-27
1
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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)

635 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