2013-02-05 23 views
-3

在我的GWT Web應用程序中,我想將一些應用程序的數據保存在用戶的瀏覽器Cookie中。如佈局條件,正在由用戶更改。我怎樣才能做到這一點?使用瀏覽器的cookie來保存web應用程序數據

+2

你嘗試過什麼嗎? – Sednus

+0

iam tryng gwt lcoal存儲。 –

+1

考慮到每次通話都會傳送Cookie數據,因此請考慮您的即時通話的性能影響! – SSR

回答

0

在GWT還有一類

import com.google.gwt.user.client.Cookies; 

是不是你在找什麼

//get cookie with name of the cookie 
    String msg = Cookies.getCookie("cookiename"); 


    //set cookie with name 

    Cookies.setCookie("cookiename",msg); 

Remeber曲奇餅沒有值返回null。

相關問題