redirect is keeping hash

前端 未结 2 557
再見小時候
再見小時候 2021-01-18 11:14

For some reason when I redirect with header(\"Location\") the new page keeps the hash.

So if you\'re on example.com/index.html#signup

2条回答
  •  Happy的楠姐
    2021-01-18 11:41

    I'm looking around for answer that works on Firefox. After a while surfing here and there while my cat is keeping meow meow, it leads me to the final solution:

    die('');

    Sometimes you want to reserve the hash, sometimes you don't, and because the cross-browser matters so it's better to control client browser to reload and kill the hash.

提交回复
热议问题