您好,欢迎访问一九零五行业门户网

bootstrap缓存怎么解决

如果你想了解更多关于bootstrap的知识,可以点击:bootstrap教程
bootstrap的缓存有时会使网页的加载速度的变慢,下面就给大家介绍一下,怎么清除bootstrap的缓存。
1、绑定事件,在关闭的时候,直接将数据清除: 
$("#model").on("hidden.bs.model",function(e){$(this).removedata();});
2、修改一下请求的url,添加随机参数,强制刷新,先用jquery的get方法取内容,再放到modal中。如下:
function remoteurl(u){ u += '&t=' + math.random(1000) $.get(u, '', function(data){ $('#remotemodal .modal-body').html(data) }) $('#remotemodal').modal({show:true,backdrop:false}) }
以上就是bootstrap缓存怎么解决的详细内容。
其它类似信息

推荐信息