also by doing what you have done users with cookies disabled wont be
able to use your site...

-igor


On Wed, Apr 2, 2008 at 7:44 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you would think that the crawl bots are smart enough to ignore
>  jsessionid tokens...
>
>  -igor
>
>
>
>
>  On Wed, Apr 2, 2008 at 5:20 PM, Dan Kaplan <[EMAIL PROTECTED]> wrote:
>  > victori_ provided this information on IRC and I just wanted to share it 
> with
>  >  everyone else.  Googlebot and others don't use cookies.  This means when
>  >  they visit your site it adds ;jsessionid=code to the end of all your urls
>  >  they visit.  When they re-visit it, they get a different code, consider 
> that
>  >  a different url with the same content and punish you.  So, for the web
>  >  crawling bots, it's very important to get rid of this (Perhaps it's
>  >  worthwhile to check this code in to the code base).
>  >
>  >  Here's what you do in your Application:
>  >
>  >   @Override
>  >      protected WebResponse newWebResponse(final HttpServletResponse 
> servletRe
>  >  sponse) {
>  >           return CleanWebResponse.getNew(this, servletResponse);
>  >       }
>  >
>  >  Here's the CleanWebResponse class:
>  >  public class CleanWebResponse {
>  >     public static WebResponse getNew(final Application app, final
>  >  HttpServletResponse servletResponse) {
>  >         return app.getRequestCycleSettings().getBufferResponse() ? new
>  >  Buffered(servletResponse) : new Unbuffered(
>  >                 servletResponse);
>  >     }
>  >
>  >     static class Buffered extends BufferedWebResponse {
>  >         public Buffered(final HttpServletResponse httpServletResponse) {
>  >             super(httpServletResponse);
>  >         }
>  >
>  >         @Override
>  >         public CharSequence encodeURL(final CharSequence url) {
>  >             return url;
>  >         }
>  >     }
>  >
>  >     static class Unbuffered extends WebResponse {
>  >         public Unbuffered(final HttpServletResponse httpServletResponse) {
>  >             super(httpServletResponse);
>  >         }
>  >
>  >         @Override
>  >         public CharSequence encodeURL(final CharSequence url) {
>  >             return url;
>  >         }
>  >     }
>  >  }
>  >
>  >  Note, I haven't tested this myself yet but I plan to tonight.  Hope this 
> was
>  >  helpful.
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to