Cookie loads
richrubb opened this issue · comments
Hi, this plugin works very well and in my experience of working with the alternative mapping plugin this is by far superior.. The only issue I have with it is the load time of this code injected into the html. Although it contains 0Bytes it more than doubles the load time of the page when I test with pingdom. I just wonder if there is an issue with it or not.
<script src="http://site/wp-admin/admin-ajax.php?action=mercator-sso-js&host=site&back=http%3A%2F%2Fsite%2Fcontact%2F&site=2&nonce=932be8972d"></script> <script type="text/javascript"> /* <![CDATA[ */ if ( 'function' === typeof MercatorSSO ) { document.cookie = "wordpress_test_cookie=WP Cookie check; path=/"; if ( document.cookie.match( /(;|^)\s*wordpress_test_cookie\=/ ) ) { MercatorSSO(); } } /* ]]> */ </script>
Thanks for any pointers
Richard
@richrubb thanks for the kind words :)
Currently we're not sure of a better way to do SSO. You can disable SSO entirely if you don't need it:
In sunrise.php
:
add_filter( 'mercator.sso.enabled', '__return_false' );
add_filter( 'mercator.sso.multinetwork.enabled', '__return_false' );
There is a related issue here #63