Commerce Server General - How to detect and redirect to cookie disabled page?

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > March 2005 > How to detect and redirect to cookie disabled page?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to detect and redirect to cookie disabled page?
TechMate

2005-03-10, 5:54 pm

I am trying to check if the client browser has cookies ENABLED or not and if
not to redirect to a NoCookie.aspx page. This check needs to be ensured for
Login and Basket pages. How do I accomplish this in Commerce Server 2002
sites. I tried setting the CS Authentication - No Cookie form property (full
path to NoCookie page) but did not work. Is there any in-built
CommerceApplication methods to check this?? If not how can I achieve this??

I have tried setting a temporary cookie on session start and to check if the
cookie exists before login or basket, but the check function always returns
true.

private void CheckBrowserCookies()
{
if (Request.Cookies["CheckBrowser"] != null )
return;
else
Response.Redirect("NoCookiesError.aspx", false);
}

Any Help is greatly appreciated.
arik

2005-03-13, 2:47 am

Hi

try this JavaScript to check if the client browser support cookies
function checkBrowser(){

if( navigator.cookieEnabled == false ){

top.location.href = "NoCookiesError.aspx
return false;

}
return true;
}

arik

"TechMate" wrote:

> I am trying to check if the client browser has cookies ENABLED or not and if
> not to redirect to a NoCookie.aspx page. This check needs to be ensured for
> Login and Basket pages. How do I accomplish this in Commerce Server 2002
> sites. I tried setting the CS Authentication - No Cookie form property (full
> path to NoCookie page) but did not work. Is there any in-built
> CommerceApplication methods to check this?? If not how can I achieve this??
>
> I have tried setting a temporary cookie on session start and to check if the
> cookie exists before login or basket, but the check function always returns
> true.
>
> private void CheckBrowserCookies()
> {
> if (Request.Cookies["CheckBrowser"] != null )
> return;
> else
> Response.Redirect("NoCookiesError.aspx", false);
> }
>
> Any Help is greatly appreciated.

TechMate

2005-03-15, 5:53 pm

Thanks Arik

"arik" wrote:
[vbcol=seagreen]
> Hi
>
> try this JavaScript to check if the client browser support cookies
> function checkBrowser(){
>
> if( navigator.cookieEnabled == false ){
>
> top.location.href = "NoCookiesError.aspx
> return false;
>
> }
> return true;
> }
>
> arik
>
> "TechMate" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com