jquery缓存图片
① js如何清除图片缓存
jquery自从1.2开始就有ifModified和cache参数了,不用自己加header
ifModified Boolean Default: false
Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header.
cache Boolean Default: true
Added in jQuery 1.2, if set to false it will force the pages that you request to not be cached by the browser.
$.ajax({
type: "GET",
url: "static/cache.js",
dataType: "text",
cache:false,
ifModified :true
});
② jquery怎样清除浏览器缓存
下载软件、文件过多;使用过程中产生的缓存数据堆积而不清理。就会导致手机存储空间不足。建议安装内存卡,并清理手机内部存储空间。具体方法如下:
1.在手机设置--应用程序管理--全部应用中,打开各应用程序详情,点击清空缓存数据。
2.在手机文件管理中,删除软件安装包,文档,压缩文件,以已删除软件命名的文件夹。
3.卸载部分不常用软件。
4.清除部分视频,音乐,图片等大文件。
5.在应用程序管理中尽可能将软件应用移动至内存卡。
6.在手机设置--存储中,将默认存储空间设置为内存卡。
7.在文件管理中,将视频、音乐、图片文件移动至内存卡。