Home >Web Front-end >Bootstrap Tutorial >How to solve bootstrap cache
If you want to know more about Bootstrap, you can click: Bootstrap Tutorial
Bootstrap's cache sometimes slows down the loading speed of web pages. Let me introduce to you how to clear bootstrap's cache.
1. Bind the event and clear the data directly when closing:
$("#model").on("hidden.bs.model",function(e){$(this).removeData();});
2. Modify the requested url and add Random parameters, forced refresh, first use jQuery's get method to get the content, and then put it in the modal. is as follows:
function remoteUrl(u){ u += '&t=' + Math.random(1000) $.get(u, '', function(data){ $('#remoteModal .modal-body').html(data) }) $('#remoteModal').modal({show:true,backdrop:false}) }
The above is the detailed content of How to solve bootstrap cache. For more information, please follow other related articles on the PHP Chinese website!