基于Javascript的重定向:它会伤害SEO吗? [英] Javascript based redirect: will it hurt SEO?

查看:144
本文介绍了基于Javascript的重定向:它会伤害SEO吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近实施了一项修补程序,根据用户是否启用了javascript来创建单独的登录页面。基本上它的工作方式是这样的。



默认页面是一个HTML页面,不带javascript。该网站的基本版本。登陆后,有一个脚本说如果启用javascript,然后转到另一页。该着陆页通过发送用户请求通过呈现页面的JSP文件(页眉,页脚等)来生成。如果用户启用了JavaScript,则最终登录页面为 http://whatever.com/home.jsp

我的问题是如果这会伤害SEO。考虑到99%的世界已启用JavaScript,我不愿意妥协任何搜索引擎优化的好处,以适应1%谁不启用JavaScript。

希望有道理。

解决方案

一般来说,searchbots应该被视为JS禁用的浏览器。我认为你现在可以想象他们会在哪里登陆。



整个问题与JSP完全无关。它只是一个服务器端视图技术,它提供了一个用于编写HTML / CSS / JS的模板,并提供了使用taglib动态控制页面流和使用EL访问后端数据的功能。所有网页浏览器和机器人看到的(以及所有关于搜索引擎优化的内容)都是它生成的HTML输出。


I recently implemented a fix to create separate landing pages depending on whether or not the user has javascript enabled. Basically the way it works is this.

The default page is an HTML page w/ no javascript. Basic version of the site. Upon landing on it, there is a script that says if javascript is enabled then go to another page. That landing page is generated by sending the user request through a JSP file that renders the page (header, footer, etc.). The final landing page is http://whatever.com/home.jsp if the user has javascript enabled.

My question is if this will hurt SEO. Considering 99% of the world has javascript enabled I would hate to compromise any SEO benefit to accomodate the 1% who doesn't enable javascript.

Hope that make sense.

解决方案

In general, searchbots should be treated as browsers with JS disabled. I think you can now imagine where they'll land.

This whole question is by the way completely unrelated to JSP. It is just a server side view technology which provides a template to write HTML/CSS/JS in and provides capabilities to control the page flow dynamically with taglibs and access backend data with EL. All what webbrowsers and bots sees (and thus all what counts for SEO) is its generated HTML output.

这篇关于基于Javascript的重定向:它会伤害SEO吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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