Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...