home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_06.cab / samp2een.asp < prev    next >
Text File  |  1997-09-29  |  3KB  |  42 lines

  1.  <% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp2een.asp&srcfile=Interaction/Expire" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  3. <HTML>
  4. <HEAD>
  5. <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
  6. <title>Setting Expiration Info</title>
  7. <script language="JavaScript">
  8.  
  9.     szNavVersion = navigator.appVersion
  10.  
  11.     if (navigator.appName == "Microsoft Internet Explorer") {
  12.     if (szNavVersion.indexOf ("4.") >= 0) {
  13.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  14.     } else {
  15.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  16.     }
  17.     }
  18.     else if (navigator.appName == "Netscape") {
  19.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  20.     }
  21.     else {
  22.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  23.     }
  24.  
  25. </script>
  26. <META NAME="DESCRIPTION" CONTENT="Internet Information Server reference information"></HEAD>
  27. <BODY BGCOLOR=#FFFFFF TEXT=#000000>
  28. <font face="Verdana, Arial, Helvetica">
  29. <h3><a name="_setting_expiration_info"></a>Setting Expiration Info</h3>
  30. <p>
  31. You can give every page or script that a client browser accesses on the server an expiration date. This can either be in the form of an absolute date, such as January 1, 2000, or a relative date, such as 600 minutes from the time the page was first downloaded by the client browser. If a client browser accesses that same page again before the expiration date and time, then the client browser uses the cached copy. </p>
  32. <p>
  33. This example illustrates how your script can set the expiration date for a file. The <b>Response.Expires</b> property is used to set the relative expiration date. The unit of measurement is minutes, so if this property is set to 10, as in the example, then the page will expire after 10 minutes. </p>
  34. <p>
  35. The <b>Response.ExpiresAbsolute</b> property allows you to specify an absolute expiration date. In this example, the page is specified to expire on January 1, 1999, at 1:30:15pm. Either the time or the date can be left out when assigning an expiration date.</p>
  36. <p>
  37. <b>Note</b>  IIS sends all HTTP headers required for a given Web page or script before any HTML is sent to the client browser. Therefore, all statements and methods that modify the HTTP headers of the response, including setting the <b>Response.Expires</b> and <b>Response.ExpiresAbsolute</b> properties, must be located before the <HTML> tag in your script. If your script attempts to modify the HTTP headers after the server has begun sending HTML content back to the client browser, the script will generate an error.</p>
  38. <hr class="iis" size="1">
  39. <p align="center"><em><a href="/iishelp/common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
  40. </BODY>
  41. </HTML>
  42.