Jump to content
  • 0

Cookie On Authentication Page


Master
 Share

Question

1 answer to this question

Recommended Posts

  • 0

If I understand correctly, you want to check if the Cookies are enabled on the Authentication page.

 

You can use JavaScript code.

Please follow these steps:

1) Open your Authentication, select Custom in the Setup options field.

2) In the Element section, add a Header&Footer element (the Plus button in the header of the section).

3) To the Footer, add the JavaScript code:

 

<script type='text/javascript'>

function are_cookies_enabled()

{

    var cookieEnabled=(navigator.cookieEnabled)? true : false;

    if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled)

   {

        document.cookie="testcookie";

        cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false;

    }

    if (!cookieEnabled)

        alert('Cookies are disabled!');

}

window.onload=are_cookies_enabled;

</script>

 

You can enter your text instead of "Cookies are disabled".

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...