Meta tag redirect good or bad for search engines?
I have this meta tag to check if JavaScript is enabled:
<meta http-equiv="refresh" content="0;url=http://www.example.com/activate_js.html"开发者_开发问答>
Is this bad in the eyes of search engines like Google, Bing and Yahoo?
If so, what other "safe" methods are there?
META tag to check if JavaScript is enabled? Not sure I understand what you mean there...
With regard to the question about META tag redirects, these are bad for search engine optimisation (SEO). The correct way is to send an HTTP 301 Moved Permanently Header, either with Apache configuration or perhaps PHP.
ahh, that meta tag! i know it. it jumps from website to website and drivers webmasters crazy by detecting their javascript! search engines don't like it because it move so fast they cannot index! but it seems like it only comes out in moonshine!
but to answer your question, meta redirects are not followed by most search engines and if they are, (almost) no linkjuice/pagerank is passed on (if that was your question). use 301 redirects for that
Just let Google answer this question:
Google understands the following meta tags (and related items):
[…]
<meta http-equiv="refresh" content="...;url=..." />
This meta tag sends the user to a new URL after a certain amount of time, and is sometimes used as a simple form of redirection. However, it is not supported by all browsers and can be confusing to the user. The W3C recommends that this tag not be used. We recommend using a server-side 301 redirect instead.
Yahoo used to have a message about meta
redirects on its pages, but I can't find it anymore. It's quoted in this older article:
META Refresh:
<meta http-equiv="refresh" content=…>
is recognized as a 301 if it specifies little or no delay or as a 302 if it specifies noticeable delay.
That said, I agree with others that it's best to use a 301 or 302 redirect.
However, this works regardless if JavaScript is enabled or not. To do a redirect using JavaScript, you can issue
window.location = "url-to-navigate-to";
in a script. But notice this really isn't followed by search engines, as they don't interpret JavaScript and just 'read' the page as is.
精彩评论