Using the noscript tag with Ajax
I'm developing a site which is heavily loaded with ajax. Not very practical in SEO terms and that's why I am here. The thing I'm thinkin about doing is using the <noscript>
tag to implement headers and footers for non-javascript users and googlebot etc. Example
<noscript>
<html>
<head><title="Blah"></head>
<body>
</noscript>
<div> NORMAL CONTENT HERE </div>
<noscript>
</body>
</html>
</noscript>
Am I correct in my use of noscript? If not please just regard it as the correct use. Anyways, this will enable my google crawls to be more successful and index each and every page.
The problem? When a user clicks on a page link in google that isn't indexed. HTML (as thats where the ajax is situated) they will only see the <div>
in the center that isnt wrapped in noscript, thus meaning the visitor gets a dreadful view of the site, and has no navigation to browse the site. Am I right? Are you following me?
I want to know if theres a开发者_如何学Python function that will parse the content wrapped in noscript to javascript enabled browsers upon first visit to the site. Is this possible? Or maybe you have an alternative? Maybe an include that detects if javascript is enabled and displays content based on that?
ALL suggestions welcomed here.
Ok. You can improve this by:
- Use normal links with normal (valid)
href
s. But the js function that is bound to them returns false. So the links would work with or without JS - Make your javascript recognize url parameters and show the appropriate div
- And then, you don't need to use
<noscript>
perhaps create a redirect on your web server?
精彩评论