Welcome Guest, Not a member yet? Register   Sign In
Session Class/Session Hybrid
#9

[eluser]skunkbad[/eluser]
Hi InsiteFX,

I'm assuming by "session" cookies we are talking about persistent cookies. So, perhaps it is necessary to try to detect if the browser accepts cookies. I do this already like this:

Code:
[removed]
$(document).ready(function() {
  var cookie_checker = navigator.cookieEnabled ||
   ("cookie" in document && ([removed].length > 0 ||
   ([removed] = "test").indexOf.call([removed], "test") > -1));

  if( ! cookie_checker ){
   $('#alert-bar').html('<?php echo addslashes( $message ); ?>').show();
  }

  $('#alert-bar').click(function(){
   $(this).slideUp();
  });
});
[removed]

But I haven't done any testing to know if this would detect if persistent cookies are disabled. What are you doing? To some degree I figure that somebody that has cookies turned off is already wondering why half the internet doesn't work for them.


Messages In This Thread
Session Class/Session Hybrid - by El Forum - 04-11-2012, 03:49 PM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 07:22 AM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 07:29 AM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 08:45 AM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 08:46 AM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 11:26 AM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 12:20 PM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 08:38 PM
Session Class/Session Hybrid - by El Forum - 04-19-2012, 11:46 PM
Session Class/Session Hybrid - by El Forum - 04-20-2012, 02:26 AM
Session Class/Session Hybrid - by El Forum - 04-20-2012, 09:38 AM
Session Class/Session Hybrid - by El Forum - 04-20-2012, 08:32 PM
Session Class/Session Hybrid - by El Forum - 02-20-2013, 09:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB