SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 15th, 2003, 12:03 PM
Humble Seeker Humble Seeker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: London
Posts: 69 Humble Seeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 54 sec
Reputation Power: 7
Angry Cookie won't die, it's a cache things I think

I've got a problem with a web site that caches a cookie centrally, causing users of my simple e-commerce site to get wrong shopping baskets. Any ideas why this might be happening

Details
---------
I've got a simple ASP/ SQL Server 2000 web site sitting on a third party host. The site is a very basic b2b web site taking order for materials. I use a cookie to hold the basket number, the basket is in the database.

The problem I'm having is that some of the users are getting old orders or orders that have been placed by someone else in their company. The few HTML pages that are on the site are also being heavily cached, and not updated. I've set everything I can think of to not cache and killed the cookie more times than JFK was shot, and still the problem persists.

As you can tell I think the problem is cookie based but I've never heard of a cookie being cached centrally. Has anyone else experianced this problem? Please not (pride talking) I didn't build this cursed site, I've just been asked to keep it moving. Any help is greatly appreciated.

Would the fact that part of the site from an intranet rather than directly from the internet.

FYI: I am unable to post any code for this problem. I'm just wondering if anyone else has experianced it, and if you've found a solution.
__________________
Humble Seeker

The longest journey starts with the smallest step, and knowledge is the longest journey of all.

Reply With Quote
  #2  
Old July 15th, 2003, 12:34 PM
kkong's Avatar
kkong kkong is offline
Monkey Magic
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: UK
Posts: 103 kkong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to kkong
Hi,

To clear cached pages in asp add these lines to the to of the asp file.

Code:
Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader "cache-control", "no-store, must-revalidate, private"
Response.AddHeader "Pragma", "no-cache"
Response.Buffer = True



This should always force the page to be re-loaded and not use a cache copy.

I`m not sure about your cookie problem.. give this a go though.

Kong.

Reply With Quote
  #3  
Old July 16th, 2003, 03:43 AM
Humble Seeker Humble Seeker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: London
Posts: 69 Humble Seeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 1 m 54 sec
Reputation Power: 7
IP addresses hadn't thought of that. I agree a very naive programmer coded the problem site up. Unfortunetly he's currently the senior programmer for the company I work for. I'm just the muggings who has to try and fix the problems he made.

I can't post the code at the moment because it goes against company policy. I'll try and create a sanatised version which implements what I've done to do to date.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Cookie won't die, it's a cache things I think


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway