1

If I use Ajax.ActionLink in my ASP.NET MVC 3 app, when I browse the 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

kenwarner
  • 28,650
  • 28
  • 130
  • 173
  • You could look with Fiddler and see what's the different between the HTTP requests that your site makes with Ajax.ActionLink and a site that does not have the same behavior. It's a long shot but I suspect there is something slightly different in the request that is causing this. Do you get the same behavior in your site if you use straight jQuery instead of Ajax.ActionLink? – Hector Correa Aug 17 '11 at 01:21

1 Answers1

1

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.

David Levin
  • 6,573
  • 5
  • 48
  • 80