Browser support for window.location.reload(true)

孤街浪徒 提交于 2019-11-28 02:38:23

问题


window.location.reload() is supported in all browsers, according to w3schools

But what's with window.location.reload(true) which reloads the page without cache? How well is it supported?


回答1:


location.reload() takes no arguments in the specification, so do not rely on it. It is implemented in some browsers though, including Mozilla Firefox.




回答2:


reload() is supposed to accept an argument which tells it to do a hard reload, ie, ignoring the cache:

location.reload(true);

Note : I don`t think just saying that it is supported with FF is right, here it is clearly mentioned that it is supported by other browser as well.

Check out below links for more information

how-can-i-refresh-a-page-with-jquery

Reload without cache

Location.reload

Reload method

refresh-reload-page-using-jquery

Is Window.location.reload(true)?

Little Extra information in this question

difference-between-window-location-href-window-location-href-and-window-location

Hope this helps



来源:https://stackoverflow.com/questions/10876244/browser-support-for-window-location-reloadtrue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!