我做了一个登陆,想把用户名使用cookie保留,以便下次打开登陆界面的时候能自动获取我保留的用户名,但是出现一个问题:当用户在浏览器中屏蔽了cookie的使用这个功能就失效啦。想请教一个其他的方案来实现这个功能。不知道用什么方法好希望大家指教小弟一下!!!!!

解决方案 »

  1.   

    使用COOKIE,禁用了就用不了,,怎么实现?实现就不能用COOKIE
      

  2.   

    在浏览器的internet选项中就可以屏蔽cookie.
    或则说如果不使用cookie技术,还有什么比较好的办法能实现这个保留用户名的功能啊
      

  3.   

      cookies是在客户端的,客户端要是把cookies禁了你就没办法啊
       呵
       这个就是这样的
     
      

  4.   

    除了Cookie以外也有一些服务器端存储方案,不过都是依赖具体浏览器的,而且安全要求比cookie的还高。
      

  5.   

    cookie是应用最广泛的一种方法,至今许多网站都依赖cookie完成楼主想要的功能
    一旦cookie被禁用的,一般情况下,就不太好实现了
      

  6.   

    public java.lang.String encodeURL(java.lang.String url)    Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary.    For robust session tracking, all URLs emitted by a servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.    Parameters:
            url - the url to be encoded.
        Returns:
            the encoded URL if encoding is needed; the unchanged URL otherwise.
      

  7.   

    cookie被禁用,还真没有什么办法识别
      

  8.   

    如果客户端浏览器禁用cookie的话,就没办法了这个也是cookie不稳定的原因之一。你无法把控客户的浏览器安全级别问题。
      

  9.   

    可以判断一下,如果cookie没有被禁用就保存在客户端,否则保存在服务器中
      

  10.   

    那就把用户的IP 记录到服务器端,用户登陆的时候如果没有cookie 就去匹配其IP