urgent:ASP page won't refresh

Posted on 2003-03-28
Medium Priority
Last Modified: 2008-03-03
Hi, I'm new to developing ASP pages
actually im new to developing anything

my pages simply won't refresh.
for example,i would have a pull down menu that allows me to remove a category from my database
after removing a particular category, if i click on the remove category link,
the drop down menu will still show me the category that i have just removed, eventhough it is already removed.
but when i refresh the page (f5 button), the pull down menu will display correctly the categories.

my shopping cart page has the same problem also.
unless i hit on refresh button, the page will not display the newly added items, eventhough it's already added to my session.

im using dreamweaver mx and IIS on my laptop(winXP) with SQL for my database.

the frustrating is that my pages were working fine a few days ago, no refreshing problem.
i did not make any changes to my system config, not that i remember of.
so i have no idea what is causing this.
I hope someone can help me asap because my project deadline is very near
Question by:juljul
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

Accepted Solution

markhoy earned 300 total points
ID: 8226231
Add this code to the top of each page (or add it as an include):

Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"

Some related KB articles include:


Expert Comment

ID: 8226243
to use it as an include:

1. save the code as no_cache.asp:

Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"

2. at the top of each asp page write:

<!-- #include file="no_cahce.asp" -->
LVL 34

Expert Comment

ID: 8226302
Markhoy's response is really good.  You just have to remember, if there is a proxy server between you're client and server (and there usually is), sometimes the proxy servers dis-regard these tags and cache the data anyway....

Sometimes, if you had a random variable on your URL it will help with the problem too--somthing like this:

response.redirect ("mypage.asp?random=" & time)


Author Comment

ID: 8229487
Hi markboy,

I have tried what you suggested me to do and it works!
however, another problem arises,
my pages can't be viewed on dreamweavermx.
I have templates on my pages.
On some pages, I'm not able to add the code in, the error is that "Making this change would require changing code that is locked by a template or a translator. The change will be discarded."
For those pages that I can actually add the code, eventhough I have no idea why because these pages have the same templates, all that shows up on design view , after I add that 1 line, is just an empty page.
I can only manipulate it from code view, I can't see the result on design view.
Do you have any idea how I can fix this prob?
LVL 58

Expert Comment

ID: 9183374
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by markhoy

Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

743 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