CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Disabling History

Print topic Send  topic

Author Message
DaveUK
Posted: 03/10/2002, 8:17 AM

Can anyone help me..

I am currently working on a web site for my wife, part of this is the shopping cart - which is working pretty well. There will only ever be 1 quantity of an item against a stock number, so once someone orders this i set a flag in the table to R = " Reservered ". When they are in there own shopping cart they can click on order which will send there order via email etc to themselves and my wifes ordering email account, as well as setting the flag in the table to " S " meaning sold .... That all works well. so if another user logged in they would not see the items that the first person had ordered as they are new to the site. However if user A hit the back button they can go to the page where they add to shopping cart and add again --- " problem is there is only 1 of each item so there wont be any stock to support this !!" ?> see my problem. Can anyone tell me how to stop this !??. I have seen on other web sites where i click back and am hit with the comment that the information is out of date and that i have to press REFRESH to update !!. this is what i want ???

Can anyone help me please

thanks

dave
Andrew B
Posted: 03/10/2002, 5:53 PM

You would probably do best to look on the web (at www.w3c.org and thorugh google) to find out what other methods of cache control exist. The problem is you both need to tell every caching device on the response path to NOT cache the document, as well as telling the browser not to as well. I think CC already includes certain header tags that do this, but here are some other once to try. If it all works properly, your user should see a page saying 'expired' or some such when they hit back. I don't think this will work every time anyway. What you might want to try doing is checking inside the product purchase page wether or not it has been "S" sold. I would reccomend doing both.

'put this in the 'open' event ---
<% Response.CacheControl="no-cache" %>

<META HTTP-EQUIV="expires" CONTENT="0">
<HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">


A complicated topic. The best way it to set the Cache-Control HTTP Header variable from ASP script, but here are some other resources as well :
http://msdn.microsoft.com/library/default.asp?url=/libr...sp/vbob0rvw.asp
http://www.mnot.net/cache_docs/
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q222064
http://webmaster.info.aol.com/caching.html
Tom
Posted: 03/11/2002, 7:34 AM

Here's how I handle expiring a page in CF. Perhaps you can go thru it to handle your language. I turn on custom head section on the page.

<!--- These tags will expire a page so that when they hit the back button
you won't get problems looking at old data. It was also recommended to
add in the title tag a time.
<title>Your title<cfoutput>#TimeFormat(NOW(),"mmsstt")#</cfoutput></title> --->
<META HTTP-EQUIV="Expires" CONTENT="Wed, 01 January 1997 00:00:00 GMT">
<META HPPP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="expires" content="-1">
<CFHEADER name="cache-control" value="no-cache, no-store, must-revalidate">
<CFHEADER name="pragma" value="no-cache">
<META http-equiv="expires" content="0">
Jane
Posted: 03/12/2002, 12:47 AM

Hello,
I think you may use JavaScript for this purpose.

In case you'll use JavaScript to boby tag put:
<body {PageBODY} onUnload = "my_func()">

and to footer section of the page:
<script language = "JavaScript">
function my_func()
{
window.location = window.location.href;
}
</script>

If you use template pattern and generate Site.css file you may create Custom Show Page event and define body tag there, e.g.:
ASP
SetVar "PageBODY", stylePageBODY & " onUnload = ""my_func()"""
In templateless version create Custom Show Page event and modify <body> tag there.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.