10

I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and security trimmings. There are only 21 menu options, but the results HTML of the menu is a whopping 14k. The site is hosted on our company's intranet and must be serverd to people worldwide on limited bandwidth, so I'd like to reduce the size of the menus.

What is the best way to do this? Does anybody have a good reference? I have the following constraints:

  • The solution must not reference any 3rd part DLL files (getting approval would be a nightmare)
  • Has to work with IE 6

CSS and JavaScript are fine, as long as they work with IE 6.

1

2 Answers 2

3

Take a look at: http://www.asp.net/CSSAdapters/Menu.aspx

The default Menu control is rendering far too much HTML.

2
  • the only problem here is IE 6 does not support pure CSS menus.
    – Richard
    Mar 22, 2009 at 17:40
  • I've also had problems with the "Selectable" property on a menuItem being ignored once the CSSAdapters were applied to a menu.
    – Dav Evans
    May 13, 2009 at 12:16
1

You might have a look at my ASP.NET menu optimization post. What I do is extracting the common part of the menu rendered in every page to an external file that is loaded and cached only once at the user browser. This way the pages are 60-70% smaller in some cases.

1
  • Good Job and nice post on the Menu Control Optimization. +1
    – KP.
    Mar 23, 2009 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.