Refresh a page using JavaScript or HTML

This question already has an answer here:

  • How to reload a page using JavaScript? 16 answers

  • window.location.reload(); in JavaScript

    <meta http-equiv="refresh" content="1"> in HTML (where 1 = 1 second).


    Here are 535 ways to reload a page using javascript, very cool:

    Here are the first 20:

    location = location
    location = location.href
    location = window.location
    location = self.location
    location = window.location.href
    location = self.location.href
    location = location['href']
    location = window['location']
    location = window['location'].href
    location = window['location']['href']
    location = window.location['href']
    location = self['location']
    location = self['location'].href
    location = self['location']['href']
    location = self.location['href']
    location.assign(location)
    location.replace(location)
    window.location.assign(location)
    window.location.replace(location)
    self.location.assign(location)
    

    and the last 10:

    self['location']['replace'](self.location['href'])
    location.reload()
    location['reload']()
    window.location.reload()
    window['location'].reload()
    window.location['reload']()
    window['location']['reload']()
    self.location.reload()
    self['location'].reload()
    self.location['reload']()
    self['location']['reload']()
    

    Original Article


    simply use..

    location.reload(true/false);
    

    If false, the page will be reloaded from cache, else from the server.

    链接地址: http://www.djcxy.com/p/28672.html

    上一篇: 缓存通过params破坏

    下一篇: 使用JavaScript或HTML刷新页面