When to use target=“_self”

后端 未结 3 1862
无人及你
无人及你 2021-01-01 10:45

When does the _self frame target becomes useful or worth using it?

Isn\'t it (always?) the default behavior?

3条回答
  •  死守一世寂寞
    2021-01-01 11:38

    _self target value could also be useful in conjunction with AngularJS's HTML5 location mode when you do need to force full page reload for links with the same base as your single page app.

    https://docs.angularjs.org/guide/$location#html-link-rewriting

    In cases like the following, links are not rewritten; instead, the browser will perform a full page reload to the original link.

    Links that contain target element Example: link

    ...

提交回复
热议问题