Home > Web Front-end > JS Tutorial > body text

浅析showModalDialog数据缓存问题(用禁止浏览器缓存解决)_javascript技巧

WBOY
Release: 2016-05-16 17:29:38
Original
1142 people have browsed it

如果要显示最新的数据需要在页面中进行设置,取消缓存。

在showModalDialog的页面的Head标签内增加如下代码:

这样页面就不会被缓存。从而保证了在对数据进行修改后,再次打开页面后显示最新的数据。

HTML方面

禁止浏览器从本地缓存中调阅页面。
网页不保存在缓存中,每次访问都刷新页面。

同上面意思差不多,必须重新加载页面

网页在缓存中的过期时间为0,一旦网页过期,必须从服务器上重新订阅。

.NET方面
Response.Expires = -1;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!