Chrome on iOS shows weird url for jQuery Mobile page (ASP.NET MVC)

前端 未结 3 738
旧巷少年郎
旧巷少年郎 2020-12-18 08:57

I have a jQuery Mobile page that works ok in Safari on iPhone (iOS 5+). And when clicking at this link...

@Html.ActionLink(\"Click to download\", \"Download\         


        
3条回答
  •  旧巷少年郎
    2020-12-18 09:36

    Your user agent (browser) doesn't support cookies or has cookies disabled. In this case ASP.NET falls to a compatibility mode in which it tracks user Sessions by appending the session id in the url. So now all your urls will have this id. It's perfectly normal behavior.

    The same will happen not only with ASP.NET Session but with Forms Authentication cookies. You could disable this behavior for ASP.NET Session in web.config by forcing to always use cookies:

    
    

    Obviously if the user disables cookies, your application will simply crash as it won't be able to track users. And absolutely the same goes for the forms authentication cookies:

    
        
    
    

提交回复
热议问题