JavaScript hard refresh of current page

2019-01-03 13:04发布

How can I force the web browser to do a hard refresh of the page via JavaScript?
Hard refresh means getting a fresh copy of the page AND refresh all the external resources (images, JavaScript, CSS, etc.).

1条回答
劫难
2楼-- · 2019-01-03 13:30

Try to use:

location.reload(true);

When this method receives a true value as argument, it will cause the page to always be reloaded from the server. If it is false or not specified, the browser may reload the page from its cache.

More info:

查看更多
登录 后发表回答