How can I refresh a page with jQuery?

后端 未结 28 3094
刺人心
刺人心 2020-11-22 07:00

How can I refresh a page with jQuery?

28条回答
  •  感动是毒
    2020-11-22 07:20

    window.location.reload() will reload from the server and will load all your data, scripts, images, etc. again.

    So if you just want to refresh the HTML, the window.location = document.URL will return much quicker and with less traffic. But it will not reload the page if there is a hash (#) in the URL.

提交回复
热议问题