jQuery load()和SEO-有人得到了不错的答案吗? [英] jquery load() and SEO - anyone got a decent answer?

查看:356
本文介绍了jQuery load()和SEO-有人得到了不错的答案吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我网站的许多方面都是动态的.我正在使用jquery.

Many aspects of my site are dynamic. I am using jquery.

我有一个div,一旦DOM准备就绪,就会使用load()填充它.

I have a div which once the DOM is ready is populated using load().

然后,如果再次单击按钮,再次使用load(),则此值将替换为另一个值.

Then if a button is clicked, using load() once again, this value is replaced by another value.

这种设置在我的网站中很常见.我的主页本质上是许多动态加载,刷新和可更改的内容.

This kind of setup is common across my site. My homepage is essentially lots of dynamically loaded, refreshed, and changeable content.

这对SEO有何影响?

我已经看到了使用load()加载每个页面然后使用动画功能进行显示的站点……看起来真棒!

Ive seen sites where each page is loaded using load() and then displayed using the animation functions... It looks awesome !

人们以前曾提出过这个问题,但没有人正确回答.

People have posed this question before, but noone has answered it properly.

有什么想法吗? JQUERY和SEO?

So any ideas? JQUERY AND SEO??

谢谢

编辑

非常有趣的观点.我不想用jaascript覆盖我的网站..只是在必要的地方使其看起来不错-但是我的主页是一个值得关注的地方.

Very interesting points. I dont want to overdo my site with jaascript.. just where neccesary to make it look good - my homepage however is one place of concern.

因此,当DOM为readY时,它将内容加载到div中.单击选项卡后,此内容将更改. I.E没有JS,没有内容.

So when the DOM is readY, it loads content into a div. On clicking a tab, this content is changed. I.E No JS, No content.

对我来说,这里的好处是没有重复的代码.这里的建议是,如果禁用了JS,我应该简单地打印"一些默认内容,然后将选项卡链接到页面(具有相同的内容).我为SEO牺牲了一些重复的代码?

The beauty here for me is that, there is no duplicated code. Is the suggestion here that i should simply 'print' some default content, then have the tabs link to pages (with the same content) if JS is disabled. I.E sacrifice a little duplicate code for SEO?

就降级而言,我唯一关心的其他问题是同一页上的标签.我有3个div,所有div都包含内容.在此页面上,两个div被隐藏,直到单击选项卡.在开始使用JS之前,我首先使用了此方法.也许最好是load()这些标签,然后将标签按钮链接到提取内容的位置?

As far as degrading goes, my only other place of concern is tabs on the same page.. I have 3 divs, all containing content. On this page two divs are hidden until a tab is clicked. I used this method first before i started playing with JS. Would it perhaps be best to load() these tabs, then have the tab buttons link to where the content is pulled from?

谢谢

推荐答案

通过JavaScript加载的所有内容都不会被抓取.

None of the content loaded via JavaScript will be crawled.

常见且正确的方法是使用 渐进增强 :所有链接均应为实际页面的<a href="...">常规链接,以使您的网站对于搜索蜘蛛有意义";并且click()事件将覆盖load()的常规功能,因此启用了JavaScript的普通用户将看到您网站的增强型"版本.

The common and correct approach is to use Progressive Enhancement: all links should be normal <a href="..."> to actual pages so that your site "makes sense" to a search spider; and the click() event overrides the normal functionality with load() so normal users with JavaScript enabled will see the "enhanced" version of your site.

这篇关于jQuery load()和SEO-有人得到了不错的答案吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆