Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4254122
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:02:21+00:00 2026-05-21T05:02:21+00:00

I know there are a ton of posts on the ASP:Menu vs. WebKit issue

  • 0

I know there are a ton of posts on the ASP:Menu vs. WebKit issue in general, but I cannot find one that answers my question.

I frequently see people recommending two different methods to fix the problem with ASP:Menus in Apple WebKit browsers (i.e., Chrome, Safari). But which is actually better? What is the difference between these two actions besides the targeted user agent? The only difference I found is that the second will also work on the Page_Load event. I assume one is objectively superior to the other, but I do not know the difference between them. How do each of them work?

Both go in the Page_PreInit() method of the base page.

1. Clear the browser adapters.

if (Request.UserAgent.Contains("AppleWebKit"))
{
    Request.Browser.Adapters.Clear();
}

2. Change the client target.

if (Request.UserAgent.Contains("Safari"))
{
    Page.ClientTarget = "uplevel";
}

The default user agent for Google Chrome is as follows. It contains both Safari and WebKit, so I doubt the targeted user agent is a significant difference.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.X.Y.Z Safari/525.13.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:02:22+00:00Added an answer on May 21, 2026 at 5:02 am

    Alright, I have “solved” this on my own because no one else apparently knows. The actual answer is that ASP.NET recognizes browsers using WebKit as “downlevel” browsers, meaning they are supposedly incapable of processing modern HTML or JavaScript. To compensate, ASP.NET renders the menu markup differently using “Adapters.”

    In situation 2. (changing the client target), the client is forced to be recognized as an "uplevel" browser. Consequentially, the menu is rendered normally, as it would be for Internet Explorer or FireFox.

    In situation 1. (clearing the browser adapters), the client is still seen as downlevel and an adapter is inserted in order to compensate for the supposedly old browser, but before it can be used, all of the adapters are flushed out.

    Thus, I conclude that technically method 2. is better because

    1. It efficiently stops downlevel browser compensation before an adapter is used.
    2. It correctly recognizes the browser as uplevel, in case that fact is used elsewhere in the application.
    3. It does not clear the adapters, which could legitimately be used for another purpose by the user.
    4. As I said in my problem statement, it can be used on the Page_Load method rather than the Page_PreInit method, thereby allowing it to be added into a Master Page without need of an inherited base page.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know, I know, there's a ton of simple answers that cover most cases
I know there are a lot of posts about git workflows, but I couldn't
I know there have been a ton of questions about the same thing, but
I know there is a registry key indicating the install directory, but I don't
I know there are a lot of positive things mod-rewrite accomplishes. But are there
I know there have been a few threads on this before, but I have
I know there is a function somewhere that will accept a client rect and
I know there are HTML entities for 1/2, 1/4, and 3/4, but are there
I know this is probably a question that is asked a ton on here
I know there are a ton of questions on here about jquery image carousel,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.