valid-cache-response.aspx 510 B

12345678910111213141516
  1. <% @Page Language="C#" Debug="true" %>
  2. <%
  3. Response.ContentType = "text/plain";
  4. Response.Write ("Only 'no-cache', 'public' and 'private' should be OK.\n");
  5. foreach (string s in new string [] { "no-cache", "no-store", "public", "private", "no-transform", "must-revalidate", "proxy-revalidate", "max-age=10", "s-maxage=20", "cache-extension"} ){
  6. Response.Write (s);
  7. try {
  8. Response.CacheControl = s;
  9. Response.Output.WriteLine (" OK");
  10. } catch {
  11. Response.Output.WriteLine (" Failed");
  12. }
  13. }
  14. %>