Welcome to WebmasterWorld Guest from 54.167.40.25

Message Too Old, No Replies

Drop Down Menus - HTML vs .js

     
11:43 pm on Jul 15, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 4, 2001
posts:1076
votes: 3


I have a site where the user experience is best served by a multi-tiered drop-down menu. The choices were to use a DHTML app that compiles the menu data into .js files or to use a tool that outputs the menu data into HTML code.

The HTML option generates a HUGE volume of on-page code which I'd prefer to avoid. The .js option has just a couple of lines of code that calls an external file and all menu item pages get crawled and indexed via a row of footer links.

I've recently had a few experienced people look at this site to try and figure out why Penguin trashed it. All of them commented on the .js drop down as "maybe" a problem but were not sure and could not pinpoint any specific issues… more a gut feeling thing.

Anyone here with some experience on the pros and cons of .js drop-down menus?
12:54 am on July 16, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12714
votes: 244


<tangent>
The HTML option generates a HUGE volume of on-page code which I'd prefer to avoid. The .js option has just a couple of lines of code that calls an external file and all menu item pages get crawled and indexed via a row of footer links.

I don't think it's that clean-cut. The ultimate code has to be about the same size, regardless of format. It's just a question of where the user downloads it from-- as part of the page, elsewhere on your own site, or a third-party library-- and whether the work is done in your server or in the user's browser.
</tangent>

Do the footer links exist independent of the dropdown navigation part?
1:08 am on July 16, 2014 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


have you checked that the .js file isn't excluded from crawling?

perhaps the "internal links" section of GWT will give you some hints.

google has gotten pretty good about recognizing javascript menus but i wouldn't depend on that.
1:10 am on July 16, 2014 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


It's just a question of...

it's worth noting an external file gives you the option of caching reusable code.
7:19 am on July 16, 2014 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:995
votes: 48


The HTML option generates a HUGE volume of on-page code which I'd prefer to avoid

I'd look for a better one. There are good pure CSS menus out there that use minimal markup.

See also [webmasterworld.com...] (blocked CSS & JS and Panda)

And finally: [youtube.com...] (Matt Cutts on footer links)

Matt Cutts "We do reserve the right to treat links in footers a little differently". Note that I think here he's referring to the 'sitewide' scenario, but I personally would consider spiderable footer nav an additional / secondary form of navigation, not the primary.
1:42 pm on July 16, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:June 19, 2008
posts:1118
votes: 35


Ipad can't show css drop down as there is no hover support! A workaround is needed. Did you think of a ajax menue? It is best for less traffic and overhead code , plus u can make it more variable dependend on the site u are on: think about siloing.
Keep. Hreadcrumps up for poeple not using js.
5:37 am on July 17, 2014 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:995
votes: 48


My dev guy recently built a pure CSS menu that worked in iOS for a project we worked on. Failing that you can use Javascript (or jQuery) to add 'onTap' to 'hover' events in iOS.
11:06 am on July 18, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:June 19, 2008
posts:1118
votes: 35


@frantic i know that this will work. But jet this means much overhead, i keep up the question every time i redesign a site: what do i need for navigation? I see lot of overkill navigation and ask myself where is this usefull in regard of useness and traffic ?