Just using Vue to find Document.title=title on iOS does not dynamically change the title (the end of the iphone), but on the computer and Android phone, but there is no problem, carefully check the original iOS there is a title does not refresh the basic solution is:
Based on: jquery
var $body = $ ('body'= ' title 'var $iframe = $ (' <iframe src= "/favicon.ico" ></iframe>'). On ('load' , function () { setTimeout (function () { $iframe. Off('load') ). Remove () 0)}). AppendTo ($body)
Native JS:
varBODY = document.getElementsByTagName ('Body')[0]; Document.title=title; variframe = document.createelement ("iframe"); Iframe.style.display="None"; Iframe.setattribute ("src","Http://named.cn/page/take/img/icon_phone.png"); varD =function () {setTimeout () (function () {Iframe.removeeventlistener ('Load', D); Document.body.removeChild (IFRAME); }, 0); }; Iframe.addeventlistener ('Load', D); Document.body.appendChild (IFRAME);
So we solve the iOS title does not refresh the problem, we are in fact a new IFRAME element, through the hack way to refresh the title.
In fact, iOS and Android also have a lot of big and small bugs, for mobile research, for example, in the use of zepto when the tap failure problem, iOS on the tap failure is actually a ghost animal, the specific solution:
Cursor:pointer;
Just add this line of code to the bound element. Tap on iOS fails to solve the problem.
In the second is the mobile click-through problem, when a page and another page of two click links coincident, it is possible to click the first page to the second page after the automatic click, the solution is to jump after the click to cancel the current click event, is not very ghost animal?
How iOS dynamically changes the title