Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I have a problem where an enterprise web user utilizes a ipad ( safari browser ) to connect to our intranet and browse pages. The page is a simple collection of cascading dropdowns which populate a list which then populates a small section of the page with data and a image.

My problem comes in that I have placed segments of the page within update panels and configured asynch triggers for the controls. The whole page works beautifully under other browsers but fails dismally under Safari with regards to the partial postbacks and asynch responses. Googling around the net, I came across the main work around recommend as the issue appears to revolve around the safari browser and its behavior. The resolution is basically to force the Ajax toolkit to utilize webkit scripts when responding. To that end I added the following recommended snippets of code:

JavaScript
Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
if (navigator.userAgent.indexOf('WebKit/') > -1) {
    Sys.Browser.agent = Sys.Browser.WebKit;
    Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
    Sys.Browser.name = 'WebKit';
}


and in my page:

ASP.NET
 <asp:ToolkitScriptManager ID="scripts" runat="server" ScriptMode="Release" EnableHistory="true" 
EnableSecureHistoryState="false" EnablePageMethods="True" CombineScripts="true">
    <Scripts>
        <asp:ScriptReference Path="~/Scripts/IpadWorkAround.js" />
    </Scripts>


Most responses have found this to work and I got it to work on my dev machine with a installed safari browser. The problem I have now, is that when I deploy to our production environment, the site behaves as if the fix doesn't exist. I've restarted both the site and it's application pool,even restarted the server as well.

Does anyone have any ideas of whats wrong? Am I missing something maybe in my IIS config on the box that my dev environment has? I've also tried the obvious of clearing the safari browser cache, history etc as well.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900