问题
I have asp.net mvc site. User need to login for access. I found then when user added link to site on home screen of iPhone and after this user goes via this link. The site is opened in some limited sandbox(not Safari) - you can check there for different. It isn't problem. User log-in and redirected to main page. But when user clicks on any link on main page he is redirected to Safari. Sure user loses authentication in this case. How is possible to solve this?
I see two way:
- Redirect user to Safari immediately when site is opened and authenticate there.
- Keep to work in this sandbox.
I prefer first way but will be pleasure for any advice.
I have found same problem but frankly I didn't get solution
回答1:
Add
<meta name="apple-mobile-web-app-capable" content="no" />
To your HTML head section. This will make it open in Safari from the home screen.
来源:https://stackoverflow.com/questions/10717873/site-loses-authentication-if-was-open-from-link-on-iphone-home-screen