Solved

get a fresh copy everytime

Posted on 2004-10-17
3
185 Views
Last Modified: 2010-04-25
When my website is updated, the new copy never shows up unless you refresh it so if a customer returns to my website the new prices are not visible? Is there a way to get the browser to get a new copy each time without caching it? I developed the pages wiith dreamweaver so I'm not sure if this is a dreamweaver thing or html thing?
0
Comment
Question by:dotnet22
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 300 total points
ID: 12333119
what's your server side scripting language you're using?

To remove HTML cache, try add the meta tag like below:

</BODY>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
</HTML>

More info at: http:Q_20382133.html

Also, try add below to remove the cache from server side scripting language:

In ASP:

<%
      response.expires = 0
      response.expiresabsolute = Now() - 1
      response.addHeader "pragma","no-cache"
      response.addHeader "cache-control","private"
      Response.CacheControl = "no-cache"
%>

In ASP.NET:

<%
      Response.Expires = 15
      Response.ExpiresAbsolute = Now().AddDays(-2)
      Response.AddHeader("pragma","no-cache")
      Response.AddHeader("cache-control","private")
      Response.CacheControl = "Private"
%>

In JSP:

<%
      if (request.getProtocol().compareTo("HTTP/1.0") == 0)
      {
            response.setHeader("Pragma", "no-cache");
      }
      else if (request.getProtocol().compareTo("HTTP/1.1") == 0)
      {
            response.setHeader("Cache-Control", "no-cache");
      }
      
      response.setDateHeader("Expires", 0);
%>
0
 
LVL 12

Assisted Solution

by:minichicken
minichicken earned 200 total points
ID: 12333287
This is a cross posted question in the HTML TA:

http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_21171509.html

0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 12335462
Hmm..., just wonder why should minichicken get the pts in this thread while he/she just post a link?? oh.. he/she also got pts on that linked question, btw... :| ?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now