Wednesday, March 28, 2012

Disable Atlas for a Specific Browser

My website was having a specific problem with Safari that required me to disable partial rendering on that browser.

I am currently using an HTTP module to detect that browser and turn off partial rendering, but I feel like this is something that I should be able to do in a *.browser file.

Is there a way using a .browser file to disable atlas for a specific browser?

hello.

well, if i recall correctly, browser files defined the known characteristics of a browser and yuo'll not be able to do that with a file of that type.


Can you please post the code that you're using for the detection. That would save some time ...

Thx
dB.


Ok, it's pretty simple. Again, I am using this in an HTTP module so it always runs:

If HttpContext.Current.Request.UserAgent.Contains("Safari")Then
Dim smAs ScriptManager =CType(CType(sender, Page).Master.FindControl("ScriptManager1"), ScriptManager)
sm.EnablePartialRendering =False
EndIf

I was just thinking that if I could somehow add something to the browsers file that said Safari wasn't capable of using Atlas (by disabling XMLHttpRequest or otherwise), it would be more efficient than what I am doing now.

If you are curious why I am doing this, it is because I am experiencing a bug with LinkButtons, with Atlas, in Safari. I posted a question about that first, butno one had any answer.

No comments:

Post a Comment