HttpCachePolicy.SetNoStore メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HttpCachePolicy.SetNoStore メソッドの意味・解説 

HttpCachePolicy.SetNoStore メソッド

Cache-Control: no-store HTTP ヘッダー設定します

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As HttpCachePolicy

instance.SetNoStore
public void SetNoStore ()
public:
void SetNoStore ()
public void SetNoStore ()
使用例使用例

HttpCachePolicy クラスSetNoStore メソッド使用して応答履歴格納しないようクライアント指示する方法次のコード例示します

<%@ Page language="VB" AutoEventWireup="true"
 %>
<HTML>
  <HEAD>
    <title>HttpCachePolicy - SetNoStore - Visual Basic .NET Example</title>
    <script runat="server">
      Sub Page_Load(ByVal sender As
 Object, ByVal e As EventArgs)
 
          
          ' Prevent the browser from caching the ASPX page.
          Response.Cache.SetNoStore()
          
          ' Display the DateTime value.
          Label1.Text = DateTime.Now.ToLongTimeString()
      End Sub  
  </script>
  </HEAD>
  <body>
    <form id="Form1" method="post"
 runat="server">
      <h3>HttpCachePolicy - SetNoStore - Visual Basic .NET Example</h3>
      
      <P>Click the Submit button a few times, and then
 click the Browser's Back button.<BR>
      You should get a "Warning: Page has Expired"
 error message.</P>
      
      <P>Time:  <asp:Label id="Label1" runat="server"
 Font-Bold="True" ForeColor="Red"
 /></P>
      
      <asp:Button id="Button1" runat="server"
 Text="Submit" />
    </form>
  </body>
</HTML>
<%@ Page language="c#" AutoEventWireup="true"
 %>
<HTML>
  <HEAD>
    <title>HttpCachePolicy - SetNoStore - C# Example</title>
    <script runat="server">
      void Page_Load(Object sender, EventArgs e) 
      {
        // Prevent the browser from caching the ASPX page
        Response.Cache.SetNoStore();
        
        // Display the DateTime value.
        Label1.Text = DateTime.Now.ToLongTimeString();
      }
    </script>
  </HEAD>
  <body>
    <form id="Form1" method="post" runat="server">
      <h3>HttpCachePolicy - SetNoStore - C# Example</h3>
      
      <P>Click the Submit button a few times, and then click the Browser's
 Back button.<BR>
      You should get a "Warning: Page has Expired" error
 message.</P>
      
      <P>Time:  <asp:Label id="Label1" runat="server"
 Font-Bold="True" ForeColor="Red" /></P>
      
      <asp:Button id="Button1" runat="server" Text="Submit"
 />
    </form>
  </body>
</HTML>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「HttpCachePolicy.SetNoStore メソッド」の関連用語

HttpCachePolicy.SetNoStore メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HttpCachePolicy.SetNoStore メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS