-
-
Notifications
You must be signed in to change notification settings - Fork 5k
not respect <base > tag #1426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
need some help thanks! Search Engine's page cache will inject |
This seems to be a feature request, not a bug report. |
If modify that, it maybe a breaking change https://github.com/vuejs/vue-router/blob/dev/src/history/base.js#L194, but work right! |
At the moment, you can specify |
@posva thanks for your advice, in my case, I can't control the value of the base href, it was added by search engine, e.g: vue-router page cache: https://webcache.googleusercontent.com/search?q=cache:PKjSDLmsED8J:https://github.com/vuejs/vue-router+&cd=1&hl=zh-CN&ct=clnk&lr=lang_en in console:
|
After searching a bit, this looks like there will be a problem with Google cache because the base tag is pointing to |
the most desirable thing is respect |
Version
2.5.3
Reproduction link
https://output.jsbin.com/yivetu/
Steps to reproduce
click the
index
hrefWhat is expected?
Index url should be: https://www.example.com/
now it is: https://www.example.com/https:/www.example.com/news/index.html/
What is actually happening?
vue-router can't parse base url
This example is from the html spec about
base
tag https://html.spec.whatwg.org/multipage/semantics.html#the-base-elementIf the
archives's
href start with/
, the link would be a link to "https://www.example.com/archives" (whithout/news/
) . Andvue-router
now doesn't support set base with:https://www.example.com/news/index.html
.some other maybe related discussions: remix-run/history#94
The text was updated successfully, but these errors were encountered: