开发者

ASP.NET MVC Unobtrusive Ajax is still obtrusive in mobile Safari

开发者 https://www.devze.com 2023-03-27 19:10 出处:网络
If I use Ajax.ActionLink in my ASP.NET MVC 3 app, when I browse th开发者_开发问答e site with mobile Safari and click my ajax links, the browser address bar drops down and briefly shows the POST url. N

If I use Ajax.ActionLink in my ASP.NET MVC 3 app, when I browse th开发者_开发问答e site with mobile Safari and click my ajax links, the browser address bar drops down and briefly shows the POST url. Not a huge deal, but it is distracting and most Ajax-enabled sites don't seem to have this issue. Is there anything I can do to make that not happen, and still be able to use the Ajax helpers


One of main principle of unobtrusive javascript is give possibility to work users with and without javascript turned on. If your javascript turned on - you click link and get popup/update. But else you work with this link as simple link - open new page.

Ajax Helpers works normally, because it render cross-browser html tag a with hyperreference and data attributes, that should be supported.

And there is no problems in ASP.NET MVC Scripts ("jquery.unobtrusive-ajax.js"), because their algorythms based on JQuery only and on assumption, that JQuery supports all browsers.

And JQuery really do that, but not at all, especially not for old browsers (jquery browser support) and some mobile platforms with cutted (for performance reasons or again old age) capabilities for browser works normally (jquery mobile platforms support).

I hope it help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号