<p>I have a very large cascading menu system with over 300 items in it. <em>(I know it's large but it's a requirement.)</em><br>
Currently, it's written in javascript so the external file is cached by browsers.  </p>

<p>To improve search engine results I need to convert this to a css menu system.<br>
I realize the browsers will also cache external stylesheets but, </p>

<ul>
<li>is there a way to cache the menu content (<code>&lt;ul&gt;</code> and <code>&lt;li&gt;</code> tags)?  </li>
</ul>

<p>If I use javascript (<code>document.write</code>) to write the content I could have this in an external javascript file, which would be cached locally, but,</p>

<ul>
<li>would this be search engine friendly?  </li>
</ul>

<p>What is the best solution?</p>

[{'answer_id': 55759, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 3, 'selected': False, 'text': '<p>The best way to accomplish what you want to do is using <a href="https://www.google.com/webmasters/tools/docs/en/protocol.html" rel="nofollow noreferrer">SiteMaps</a> to inform Google about the urls for your web site.  Basically you will want to translate your hierarchial data for the menus into a SiteMap.</p>\n'}, {'answer_id': 55796, 'author': 'Garo Yeriazarian', 'author_id': 2655, 'author_profile': 'https://Stackoverflow.com/users/2655', 'pm_score': 0, 'selected': False, 'text': "<p>You could generate the menus beforehand into static html / javascript files, and have all the pages pull the site from the same URL on your site.  That way, the client side browser will do the caching.  You'll just have to have a step in your deployment that generates the html files for the menu.</p>\n\n<p>Try to have it generate as much plain HTML (+JS +CSS) as possible, then whatever has to be dynamic can be adjusted with javascript.</p>\n"}, {'answer_id': 55815, 'author': 'David L Morris', 'author_id': 3137, 'author_profile': 'https://Stackoverflow.com/users/3137', 'pm_score': 0, 'selected': False, 'text': '<p>You could do the whole thing in CSS and HTML only, and you don\'t need yo use any Java script.  See &lt; <a href="http://www.netwiz.com.au/cssmenu.htmlvalue" rel="nofollow noreferrer">http://www.netwiz.com.au/cssmenu.htmlvalue</a> >.  This pages shows a tool to be used with a specific documentation software, but the sample CSS and HTML shows how to use  ul li elements for a CSS/HTML only menu in a large number of browsers.</p>\n\n<p>You still have the problem of 300 items in the menu which will add to the loading time.  If this is an issue I guess you could move this code to a separate iframe to increase the chance of it being cached at a proxy (or by the browser).  At the risk of offending the purists even a frame might do the job, but you will have problems with the topic pages not being able to display the menu if they are linked to directly.</p>\n'}]
['https://Stackoverflow.com/questions/55752', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4888/']