简体   繁体   中英

Using cookies to make browser-window changes unnoticeable

Is it possible to save user identifying data in a cookie, so if the user changes browsers on a login-required page, then you could pick up the user identifying information and use it to make the transition unnoticeable, rather than having to prompt the user to log in again?

I have noticed a lot of sites develop this way, I would like to avoid this on my projects, if at all possible.

Edit

What I mean by 'changing browsers' is from chrome to firefox, or firefox to ie.

I appreciate any advice.

Thanks in advance!

you can use a flash cookie.. if its relevant for your solution.

How do I uniquely identify computers visiting my web site?

Cookies are specific to only one browser, to accomplish this task, what you really have to do is track the IP address of the person, and store the IP address in your server instead of the browser, so when the person changes the browser, you can see, that the IP is same and return the same content.

This is something of the kind i was talking about:

<?php
    // First time visit
    $file = fopen("servercookies.txt","w");
    fwrite($file, $_SERVER['REMOTE_ADDR']." user123223 ".$preferences);
    fclose($file);
?>

I know that $preferences doesn't exist, its just to show you how you might go about doing it..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM