views:

66

answers:

2

Hi,

Hoping someone can assist as well as explain the following:

I am using jQuery Superfish menu on ie6 and from what I can see from the apache log files for my session, is that whenever I hover over a menu item in my Superfish menu that has sub-menus, depicted with menu item that has a white arrow head image to the right of the menu item label, a whole heap (say 25 lines) of log entries spit out with the following type message:

- - [23/Aug/2010:11:57:45 +1000] "GET /abcprod/images/arrows-ffffff.png HTTP/1.1" 304 - etc…..

Unsure also what the number 304 indicates where in the apache log?

These types of entries keep on appearing everytime I just hover over a menu item with sub-menus and this also includes sub-menu items that also have child menu items.

The strange thing is though, when running the app through Google Chrome and checking that session in the apache logs, it does spit out anything relating to the arrows-ffffff.png image.

Can anyone pls assist as to why and what is going on here with ie6 together with the Superfish menu hover?

FYI, I have also included CSS that Superfish users relating to the class f-sub-indicator, i.e.

.sf-sub-indicator {
position:       absolute;
display:        block;
right:          .75em;
top:            1.05em; /* IE6 only */
width:          10px;
height:         10px;
text-indent:    -999em;
overflow:       hidden;
    background:     url("/abcprod/images/arrows-ffffff.png") no-repeat -10px -100px;
}
==>
a > .sf-sub-indicator {  /* give all except IE6 the correct values */
    top:            .8em;
    background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}

/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
    background-position: -10px -100px; /* arrow hovers for modern browsers*/
}

Thanks

A: 

Hi,

Unsure about the specifics for SuperFish in the context of IE6 (isn't it dead aleady? (-; ), and jQuery, but a "304" is an HTTP code like 404, 403, etc. A 304 means that file has not been modified since the last time it was requested. Comes in handy for caching, reducing requests to servers, etc.

More on status codes here:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

It is possible IE6 is making a "GET" request for this image when menu is activated ... ? It is requesting the same file 25 times ... ? Activate the first sub-menu with arrows, and count the number of arrows. Then check the logs. If the # of log entries is equal to the number of arrows, you know what IE6 is doing.

Sorry couldn't be of more help, but HTH,

KM

KM
Thanks for the response.
tonsils
+1  A: 

Since IE6 doesn't support :hover pseudo-selectors, I'm guessing that superfish uses some kind of browser sniffing to apply IE-specific behaviours (something like this).

The problem with that is since the CSS hover rules are transformed onto javascript expressions, I'm guessing that IE is stupid enough to request a new img every time the javascript behaviour transforms the element.

A possible solution would be to ensure that the javascript only toggles some class (let's say it adds a .hover class) and then let CSS apply the background onto the class selector. An example: a:hover becomes a.hover.

Miguel Ping