我有一个脚本,如果它不在我网站上的 iframe 中,它会重新加载博客页面。这会干扰搜索引擎抓取博客吗?
我的直觉说这个脚本不会阻止博客被抓取,但它会干扰搜索引擎生成的任何链接,因为这些链接会将用户与 js 转储到“顶级”的博客,而不是他们所追求的页面。要解决这个问题,需要一些花哨的 cookie 工作。
<script type="text/javascript">
if (self.location == top.location && location.search.substring(1) != 'nf')
top.location.href = 'http://www.parentSite.co.uk/cms/section/iframe/'
</script>
你说什么?