淺析showModalDialog資料緩衝問題(用禁止瀏覽器緩衝解決)

來源:互聯網
上載者:User

如果要顯示最新的資料需要在頁面中進行設定,取消緩衝。

在showModalDialog的頁面的Head標籤內增加如下代碼:
<meta http-equiv="pragma" content="no-cache">
這樣頁面就不會被緩衝。從而保證了在對資料進行修改後,再次開啟頁面後顯示最新的資料。

HTML方面
<meta http-equiv="pragram" content="no-cache">
禁止瀏覽器從本機快取中調閱頁面。
網頁不儲存在緩衝中,每次訪問都重新整理頁面。
<meta http-equiv="cache-control" content="no-cache, must-revalidate">
同上面意思差不多,必須重新載入頁面
<meta http-equiv="expires" content="0">
網頁在緩衝中的到期時間為0,一旦網頁到期,必須從伺服器上重新訂閱。

.NET方面
Response.Expires = -1;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.