[removed].reload not working for Firefox and Chrome

前端 未结 8 513
灰色年华
灰色年华 2020-12-08 15:44

I want to change the user status on click of a Button, so all I am doing is, detecting the current status and changing, if needed.

But in this case the changes the s

8条回答
  •  無奈伤痛
    2020-12-08 16:26

    I have two other options to you:

    history.go(0);
    

    And:

    window.location.href = window.location.href;
    

    I'm not tested it on Firefox and Chrome yet, but it may help you faster. Tomorrow I'll do the tests and update the answer if this not work.

提交回复
热议问题