最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Browser support for window.location.reload(true) - Stack Overflow

programmeradmin5浏览0评论

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?

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?

Share Improve this question edited Jun 4, 2012 at 4:16 Michael Petrotta 60.9k27 gold badges152 silver badges181 bronze badges asked Jun 4, 2012 at 4:14 Adam HalaszAdam Halasz 58.3k67 gold badges153 silver badges216 bronze badges 2
  • 6 w3fools. – Andreas Wong Commented Jun 4, 2012 at 4:15
  • window.location.reload(true); // reload page with server post back – xinthose Commented Apr 16, 2015 at 17:48
Add a ment  | 

2 Answers 2

Reset to default 5

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

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

发布评论

评论列表(0)

  1. 暂无评论