Uma*_*air 2 javascript jquery redirect codeigniter
window.location.href在成功创建操作后将项目添加到数据库后,我正在使用列表视图进行重定向。
但是它所做的只是获取以前在浏览器缓存中的旧页面(不显示新添加的项目)。
我希望它从服务器获取每一个想法,就像我们使用true参数 indocument.location.reload(true)从服务器加载页面的新副本一样。
你可以使用这个:
window.location.href = "http://www.mywebsite.com/products?t="+ (new Date().getTime());
Run Code Online (Sandbox Code Playgroud)
或者:
window.location.href = "http://www.mywebsite.com/products?t="+ Math.random();
Run Code Online (Sandbox Code Playgroud)