Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Not sure if I really am on the right forum, but if not, just tell me. I have a page that is coded in Classic ASP which is used to send email. We are currently having a problem in which the page seem to be sent twice sometime. Upon checking, we found out that those who have this problem are coming from big organisation, so it was suggested that their server might cache the file for some reason.

I would like to know, is there a way in HTML (or Classic ASP) to prevent that from happening? Or is it in IIS that we must set this up?

Thanks,

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

This is more of a stackoverflow answer, but the following code at the top of your page should do it. This has to be before any HTML is sent to the user or it won't work.

<%
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
%>
share|improve this answer
    
I submited on both in fact, because I wasn't sure it was really programming related Thanks –  David Brunelle Mar 26 '10 at 19:11
    
@David: I wouldn't necessarily say it was a truly SO question, because there are probably ways to do it from the server only - just the easiest way is through code. –  MattB Mar 26 '10 at 19:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.