Results 1 to 8 of 8
  1. #1

    Cookies must be enabled [HOW]

    Hi every body

    I wounder if you can tell where can I find the code that redirect any none cookie enabled browser to a deferent page.

    Any hints or keywords I can search for, I have been looking in the last two weeks without any success,

    Thank you very much in advance


  2. #2
    Join Date
    Jul 2001

  3. #3
    Thank you very much mikeknoxv

    I think this is a nice trick but I am not sure if this is the best method to do it .

    I am looking for something for the htaccess or some kind of directive for the httpd.conf

  4. #4
    AFAIK, you can only do this by trying to set a cookie and seeing if it takes. You can do this type of thing, as mike has suggested, using Java, or JavaScript, or a perl CGI or PHP - take your pick.

    I don't see how Apache in itself would be able to tell if you have cookies enabled as this type of information isn't sent in a http request.

    I'd be happy to be proved wrong.

  5. #5
    Thank you very much chirpy

    Can some one tell me how to do it with PHP or JavaScript (I mean the script)

  6. #6
    Originally posted by S_Remi
    Thank you very much chirpy

    Can some one tell me how to do it with PHP or JavaScript (I mean the script)


  7. #7
    Don't have anything special, but a quick Google search throws up plenty of examples for you:

  8. #8
    The question is, what purpose and where is the cookie information used? You can try and get a list of browsers that aren't compatible, but most are. You aren't going to be able to accurately tell if someone has cookies enabled or not. (I don't think someone can disable their browser from sending a cookie if it's already in their local browser's cookie information, but they can disable cookies to not originally add that information to their cookie file).

    Anyway, you can only check if they have a valid cookie and process information based on that (or not). Does the cookie have some type of purpose? If it does (and I assume it does), then whatever script that uses the cookie information will be the key element in this scenario. It can see if they have the correct cookie information (or if they have any) or not. If you can better explain what you're doing, in what way and why, it will be a lot easier to make some suggestions.
    Robert McGregor
    Email: robertm@(nospam)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts