Forum Moderators: open

Message Too Old, No Replies

Using JavaScript for non-www to www redirection for jsp pages.

Will it be search engine friendly?

         

Blade3

9:52 am on Mar 2, 2006 (gmt 0)

10+ Year Member



Hi,

Is it ok to use javascript for redirecting all non-www pages to www? The purpose of redirection is to avoid content duplication. I do not have permission for 301 redirection.

The JavaScript runs as:

response.setStatus(301);
response.setHeader( "Location", "http://www.domain.com/" );
response.setHeader( "Connection", "close" );

Will search engines recognize this redirection without any penalties? Please input your valuable comments. Thank You.

- Blade3

Blade3

10:58 am on Mar 2, 2006 (gmt 0)

10+ Year Member



Is this a wrong place?

Bernard Marx

11:53 am on Mar 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



response.setStatus
response.setHeader

There is no client-side response object, and the server-side Response object (in case you are using ASP/JScript) doesn't support these methods. It's hard to tell what you are doing.