Welcome to WebmasterWorld Guest from 18.207.136.184

Forum Moderators: goodroi

Message Too Old, No Replies

Topmenu in JS or html

Is JS an option at all

     
8:00 am on Jan 9, 2019 (gmt 0)

Junior Member from DK 

Top Contributors Of The Month

joined:Oct 24, 2018
posts: 47
votes: 4


Hi guys,

We're launching a new platform/site. I've recently discovered that the new site's topmenu is programmed in Java. I'd anytime say: Oh no, we need that in old school html.

What is your opinion? Google claims to be better at deciphering JS. But... Is that safe? Considering the topmenu as an essential internal link indicator.

Thanks.
Dennis
8:03 am on Jan 9, 2019 (gmt 0)

Senior Member from US 

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

joined:Apr 9, 2011
posts:15814
votes: 848


I think your gut feeling is right. Google isn't everything; there are also humans to consider.

For every <script> there should be a <noscript>, except where the <script> is purely optional-extra-added-value-bells-whistles-fluff. Is there a <noscript> version of the menu?
8:08 am on Jan 9, 2019 (gmt 0)

Junior Member from DK 

Top Contributors Of The Month

joined:Oct 24, 2018
posts: 47
votes: 4


Hi Lucy, thanks.

"Is there a <noscript> version of the menu?" No, not that I've been able to find.
8:47 am on Jan 9, 2019 (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:11824
votes: 238


programmed in Java

javascript and java are different languages btw.

can you navigate the site with scripts turned off?
if not, you are requiring lots of extra steps by google between crawling your document and finding your menu links.
maybe they'll get it right.
maybe they won't bother.
9:41 am on Jan 9, 2019 (gmt 0)

Junior Member from DK 

Top Contributors Of The Month

joined:Oct 24, 2018
posts: 47
votes: 4


Hi Phranque,

Exactly, my concern was, if I could be certain, if Google would get the message at all.
And sorry for confusing JS and Java, I mean JS.

Thanks, guys!
10:02 am on Jan 9, 2019 (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:11824
votes: 238


have you tried "fetch and render" in GSC?
10:06 am on Jan 9, 2019 (gmt 0)

Junior Member from DK 

Top Contributors Of The Month

joined:Oct 24, 2018
posts: 47
votes: 4


Not yet, site still in the closed sandbox.
1:48 pm on Jan 9, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2692
votes: 815


I'll begin by disagreeing, you can use JS provided that all links are added to the pages before completion of the page load ("load" event) and the page loads quickly. Googlebot will "typically" sees these links and be able to crawl them.

Now for the agreeing, in the case of non-critical content I would be happy relying on the "typically" of above, but menu links are critical and even if it would be fine, I would always be worried that maybe, it isn't. So despite what I said I would not "program my menu in JS".

Let me add, the statement:
programmed in Java[Script].

is very vague.
What is the JS used for? Typically JS is added to menus by fancy web-designer to make the pull down menu scroll down smoothly, and to add spiffy hover effects. If this is the case and all the menu links are hard coded in the html then I would not be too worried. But if the JS is used to dynamically populate the menu links, then you need to be concerned.

When Googlebot crawls a page it does not immediately render the JS, it simply collects the data and indexes it. Googlebot will then render the page at some later point if it deems it necessary. This can take weeks or can never occur. Google recommends that if you are providing client side rendered content that you create a second version of the page for Googlebot (and other bots) that is pre-rendered server side.

have you tried "fetch and render" in GSC?

Given the statement above, one cannot rely on Fetch and Render as one can be certain that the "render" portion will occur.
3:58 pm on Jan 9, 2019 (gmt 0)

Junior Member from DK 

Top Contributors Of The Month

joined:Oct 24, 2018
posts: 47
votes: 4


Thanks for the elaborate answer. Especially this: "When Googlebot crawls a page it does not immediately render the JS, it simply collects the data and indexes it. Googlebot will then render the page at some later point if it deems it necessary." Scared the .... out of me.

Thnx to you all.
1:08 am on Jan 10, 2019 (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:11824
votes: 238


When Googlebot crawls a page it does not immediately render the JS, it simply collects the data and indexes it. Googlebot will then render the page at some later point if it deems it necessary. This can take weeks or can never occur.

in other words:
you are requiring lots of extra steps by google between crawling your document and finding your menu links.
maybe they'll get it right.
maybe they won't bother.
7:00 am on Jan 10, 2019 (gmt 0)

Senior Member from US 

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

joined:Nov 29, 2005
posts:10326
votes: 1059


Is that JS doing something at HTML and CSS3 can't ... if so, what?

Are you coding for g or the user?

Willing to ignore the 25% of the web with JS off or blocked?

Pick your poison. :)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members