Why location.reload() is slower than the other page reload methods?

前端 未结 2 2036
时光取名叫无心
时光取名叫无心 2021-02-20 10:41

Few months ago I posted this answer about how to refresh the page via JavaScript.

I provided a JSFIDDLE DEMO too:

var solutions = [
    function () { loc         


        
2条回答
  •  半阙折子戏
    2021-02-20 11:10

    Been looking for this myself and the best reference I could find is actually on w3schools.com

    http://www.w3schools.com/jsref/met_loc_reload.asp

    location.reload(forceGet)

    forceGet:

    false - Default. Reloads the current page from the cache.

    true - The current page must be reloaded from the server

提交回复
热议问题