Google索引HTML自定义数据属性吗? [英] Is Google indexing HTML custom data attributes?

查看:137
本文介绍了Google索引HTML自定义数据属性吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用pushState / hash bangs构建一个基于AJAX的投资组合模块,因为我排除了没有JavaScript的浏览器,我唯一关心的是HTML自定义数据属性在SEO方面的限制。

I'm building an AJAX based portfolio module using pushState / hash bangs and as I'm ruling out browsers without JavaScript the only thing that concerns me is how limited the HTML custom data attributes are when it comes to SEO.

例如,使用以下代码:

<ul class="gallery" data-anchor="/photography/example/" data-title="Example"></ul>

数据标题是否会被编入索引,即Google会收集该文本内容吗?或者我是否需要在列表中或周围添加标题标记作为描述性补充?一旦用户点击该特定图库,数据标题就会用作新的窗口标题。

Will the data-title be indexed, i.e. will that text content be gathered by Google? Or would I need to include a header tag in or around the list as a descriptive complement? The data-title is meant to be used as a new window title once the user clicks on that particular gallery.

推荐答案

不,它不会被编入索引。属性本身将与页面一起缓存,但Google没有属性或值意味着什么的上下文,因此搜索引擎没有任何意义。

No, it won't be indexed. The attribute itself will be cached with the page, but Google has no context of what the attribute or the value means, so it is meaningless to search engines.

这篇关于Google索引HTML自定义数据属性吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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