Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cookies problem - urgent!

Posted on 1998-11-19
5
Medium Priority
?
203 Views
Last Modified: 2013-12-25
I am doing an asp page to test if the visitor has the cookies property enabled in his/her browser.
This page drops a cookie with a 3 minute expiration period, than redirects to it self and then tries to retrieve the cookie. If it is successful than the cookies are activated, otherwise they're not. In either case a message is displayed.

The problem is that this works with Netscape but not with IE 3 or IE4. With either one of these browsers the message is not displayed. It seems that the browser is caching the page and it does not display the message. But the curious detail is that when I reenter the URL where the last redirection is made manually it works (at least in IE4).

What is the problem ?
0
Comment
Question by:aloha
[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
5 Comments
 
LVL 10

Expert Comment

by:MasseyM
ID: 1856487
like you said, IE is caching the page.  In your HTml you need to add this to the VERY top of the ASP page:

<%
response.expires = 1    ' This is in minutes
response.expiresabsolute = #7/5/1945 00:00:00#  ' A long time ago
%>

This will kill the caching of the page.
0
 

Author Comment

by:aloha
ID: 1856488
It doesn't work. I had already tried with response.expires and it didn't work.
Any other ideas ?
0
 

Expert Comment

by:bslavin
ID: 1856489
One way to test if it truly is caching is to eliminate the caching.  Try a <%= NOW()%> at the bottom of the page to echo the current time.  This way, the page is never the same.

If you are still getting the problem, it is not a caching issue.
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1856490
Did you try the expiresabsolute?  They are two different things.
0
 
LVL 8

Accepted Solution

by:
jhurst earned 200 total points
ID: 1856491
The easiest way to disable the cache, and the nice thing about it is that it does not require any of the newer browser features, is to re-direct yourself to the same page but add a ?xxx to the end of the url, for example:

<script>
document.location.href+='xxx';
</script>
Actually, I would make xxx a random number or some function of the time so that it really is unlikely ever to be in the cache.  We have found problems similar to yours and this is an easy, quick and safe solution, as long as Javascript is enabled.

0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

722 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