Welcome Guest Search | Active Topics | Sign In | Register

Menu Image Caching - Inactivity causes re-download Options
Afflicted
Posted: Saturday, December 29, 2007 10:50:08 AM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Hello,

I have two menus on my page that are driven by a database back-end. Both my top and bottom menus have an itemseparator that uses an image at the top and bottom (on the top menu) and on the left and right (of the bottom menu) as shown in the image below. I have placed a red box around the areas that have the images I am speaking about.



If I let the site stay inactive for a bit (5-15 minutes) then those images disappear for a bit and it requires that the user keep that particular menu item open until the items download. It happens in both IE 6 and Firefox.

Do you have any suggestions on how I can get around this behavior? I have already read and implemented your suggestions for faster rendering that was spoke about in a previous post/link to your menu help center.

Any help would be much appreciated.

Thanks!

Matt L.
eo_support
Posted: Saturday, December 29, 2007 12:58:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Matt,

I am not sure if I understand your question correctly. What do you mean by "those images disappear"? Can you post detailed step by step information?

Thanks
Afflicted
Posted: Saturday, December 29, 2007 1:08:19 PM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Sure, let me try to explain better.

Lets say that you came to my site and moused over the bottom menu item titled "Prospective Members". This would then dropdown a second menu with the options "Oregon" and "Montana", with "Select a region:" to the left of them. In the image I posted above, I have my menu set up as follows for the bottom menu dropdown:

SubMenuItemLeft : Select a region : Oregon : | (this is a separator item) : Montana : SubMenuItemRight

I must apologize, in my previous post I stated that these items were "separator items" but they are in fact regular items.

The SubMenuItemLeft and SubMenuItemRight are items that have CSS classes associated with them as follows:

.BottomMenu_SubMenuItemLeft
{
width: 23px;
height: 40px;
background: url(Images/Menu/BottomMenu_DropDownLeft.gif) no-repeat;
}

.BottomMenu_SubMenuItemRight
{
width: 23px;
height: 40px;
background: url(Images/Menu/BottomMenu_DropDownRight.gif) no-repeat;
}

Page declaration for these menu items:

<eo:MenuItem ItemID="SubMenuItemLeft" NormalStyle-CssClass="BottomMenu_SubMenuItemLeft" HoverStyle-CssClass="BottomMenu_SubMenuItemLeft" />
<eo:MenuItem ItemID="SubMenuItemRight" NormalStyle-CssClass="BottomMenu_SubMenuItemRight" HoverStyle-CssClass="BottomMenu_SubMenuItemRight" />

If the page is left to sit for a bit, then the items titled "SubMenuItemLeft" and "SubMenuItemRight" will actually disappear (i.e. the background image is not displayed) until the browser "re-downloads" them after a short delay. Then they suddenly show up and the menu looks complete.

This is how the bottom menu looks if the images are gone, prior to them reappearing after leaving the menu open for a short time (i.e. 0.5 to 1 second)



Thanks!

Matt L.
eo_support
Posted: Saturday, December 29, 2007 1:19:48 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Thanks for the detailed explanation. We are not aware of any issue that would cause menu item to "disappear" just by sitting it there, but we are aware of background image caching issues. Both IE and FireFox have problems caching background images, IE is much worse --- from our experience, it doesn't appear to cache background image at all. Based on that information, I would recommend you to try a full image item, that is, specifying the image using MenuItem.Image property instead of background image in CSS.

Thanks
Afflicted
Posted: Saturday, December 29, 2007 1:22:21 PM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Ahh, good point. I will try that out. I was not aware of the image item.

Thanks!

Matt L.
Afflicted
Posted: Thursday, January 3, 2008 10:16:51 AM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Hello,

I tried your suggestion and used this code:

e.MenuItem.Image.Url = "~/Styles/Images/Menu/BottomMenu_DropDownMiddle.gif";
e.MenuItem.Image.Mode = EO.Web.MenuItemImages.ImageMode.ItemBackground;
e.MenuItem.Image.Height = 40;

I am still experiencing the same issue though. The image "BottomMenu_DropDownMiddle.gif" is a 1px wide image and it is tiled across the menu item. Any ideas as to why I am still getting this significant delay between when the menu is shown and the time that the background image shows?

Thanks!

Matt L.
eo_support
Posted: Thursday, January 3, 2008 10:21:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Matt,

What I suggested was to use an image only item, not to use it as background. It's basically an item with just the image and no menu item text, which should be your case for the separator items and corner items.

Thanks
Afflicted
Posted: Thursday, January 3, 2008 10:30:06 AM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Ahhh, I misunderstood :)

That brings me to another question then, If I use an image item that says "Oregon", can I have it swap to another item on mouseover to an image that has Oregon underlined?

Thanks!

Matt L.
Afflicted
Posted: Thursday, January 3, 2008 10:31:44 AM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Also, would this be considered an "image-only" item?

e.MenuItem.Image.Url = "~/Styles/Images/Menu/BottomMenu_DropDownLeft.gif";
e.MenuItem.Image.Height = 40;
e.MenuItem.Image.Width = 23;
eo_support
Posted: Thursday, January 3, 2008 10:35:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Afflicted wrote:
Also, would this be considered an "image-only" item?

e.MenuItem.Image.Url = "~/Styles/Images/Menu/BottomMenu_DropDownLeft.gif";
e.MenuItem.Image.Height = 40;
e.MenuItem.Image.Width = 23;


That's correct. You would also be able to set Image.HoverUrl, etc, which answers your previous question.

Thanks
Afflicted
Posted: Thursday, January 3, 2008 10:36:58 AM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Thanks for the help :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.