Home > front end >  Window. The history. PushState APP to open the page in baidu has no effect
Window. The history. PushState APP to open the page in baidu has no effect

Time:10-08

If (window. The history & amp; & Window. The history. PushState) {
Window. The addEventListener (" popstate ", function (e) {
Var hashLocation=location. The hash;
Var hashSplit=hashLocation. Split (" #!/");
Var hashName=hashSplit [1].
If (hashName!==' ') {
Var hash=window. The location. The hash;
If (hash===' ') {
Alert (" Back button ");
}
}

}, false);
Window. The history. PushState (null, null, '# forward');
Alert (window. The location. Href)
}
Is someone met this problem? Window. The history. PushState () in the baidu APP to open the page doesn't work, are not written in the history (sometimes can be written in) what's the solution?

CodePudding user response:

Nobody met this problem, is the window. The history, pushState () are not performed, JS code to pushState stopped, is originally think may be the APP using the webview opening, but sometimes suddenly can perform again, (the main problems in baidu APP) bosses, please help to have a look
  • Related