How to clear the bootstrap cache
This article is about how to clear the bootstrap cache. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The cache of Bootstrap sometimes slows the loading speed of web pages, how to clear the cache of bootstrap.
1. When the binding event is closed, the data will be cleared directly:
$("# model") .on ("hidden.bs.model", function (e) {$(this) .removeData ();})
2. Modify the url of the request, add random parameters, and force refresh. First use the get method of jQuery to get the content, and then put it in the modal. As follows:
Function remoteUrl (u) {u + ='& tweets'+ Math.random (1000) $.get (u,'', function (data) {$('# remoteModal. Modal-body') .html (data)}) $('# remoteModal'). Modal ({show:true,backdrop:false})} Thank you for reading! This is the end of the article on "how to clear the bootstrap cache". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!