Solved

How do I both send a Cookie and redirect the browser

Posted on 1998-10-10
4
128 Views
Last Modified: 2013-12-25
How do I both send a Cookie and redirect the browser

       Send "Content-type: text/html"
       Send "Set-Cookie: Skattejagt=user; path=/;"
       Send "Location: " & SetTreasure
       Send ""
0
Comment
Question by:jfl
  • 2
4 Comments
 

Expert Comment

by:bver
ID: 1829022
You should not send both content-type and location entity-headers back to a client because these headers are exclusive.

The response should be rather:

       Send "Location: " & SetTreasure
       Send "Set-Cookie: Skattejagt=user; path=/;"
       Send "" 

assuming SetTreasure variable contains a valid URI for the redirection target.


0
 

Author Comment

by:jfl
ID: 1829023
The browser is not setting a cookie if I redirect
0
 
LVL 5

Accepted Solution

by:
aioudine earned 10 total points
ID: 1829024
require("cgilib.pl");
$SetTreasure = "HTTP://WWW.NOVELL.COM";
print "Set-Cookie: user=aioudine; path=/;";
print &PrintHeader;
print "<META http-equiv=\"refresh\" content=\"0;url=".$SetTreasure."\">";
---- end----
0
 

Author Comment

by:jfl
ID: 1829025
I have thought about that too, but it's not preferable
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
home folder path for users 4 86
Batch File to find and replace a string 15 116
pass a variable from a list to a batch file using psexec 11 64
Batch File search for Drive Letter 8 44
Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

830 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