![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 728 Pomógł: 76 Dołączył: 12.06.2009 Ostrzeżenie: (0%) ![]() ![]() |
Chciałbym zrobić coś takiego jak na forum php.pl czyli przywrócenie zawartości pola tekstowego po upływie sesji. To co wymyśliłem to sprawdzanie warunku dla czasu upłynięcia sesji. Nie wiem tylko jak 'ugryźć' tą część z przywracaniem zawartości pola txt.
Pomysły jakie mam to okresowy zapis zawartości pola do zmiennej za pomocą JS i AJAX. Any ideas ?
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 1 233 Pomógł: 87 Dołączył: 6.03.2009 Ostrzeżenie: (40%) ![]() ![]() |
Jeśli chodzi o tylko jedno pole, to można pokusił się o wrzucenie do cookie...
Kod 5.3 Implementation Limits Practical user agent implementations have limits on the number and size of cookies that they can store. In general, user agents' cookie support should have no fixed limits. They should strive to store as many frequently-used cookies as possible. Furthermore, general-use user agents SHOULD provide each of the following minimum capabilities individually, although not necessarily simultaneously: * at least 300 cookies * at least 4096 bytes per cookie (as measured by the characters that comprise the cookie non-terminal in the syntax description of the Set-Cookie2 header, and as received in the Set-Cookie2 header) * at least 20 cookies per unique host or domain name Czyli przeglądarka powinna pozwolić na ustawienie 20 cookiesów po 4096 bajtów każdy... Powinno Wystarczyć. Oczywiście nie polecam, to rozwiązanie tylko dla prawdziwych twarcieli i wymiataczy (IMG:style_emoticons/default/smile.gif) Troche poczytałem. Okazuje się że jest wiele więcej metod na przechowywanie danych po stronie klienta. Kod flash: Flash 8 persistent storage. gears: Google Gears-based persistent storage. localstorage: HTML5 draft storage. whatwg_db: HTML5 draft database storage. globalstorage: HTML5 draft storage (old spec). ie: Internet Explorer userdata behaviors. cookie: Cookie-based persistent storage. Do pobrania: http://pablotron.org/?cid=1557 Pod FF i Opera działa mechanizm "localstorage", do 5MB.. http://frontend.pl/2010/04/w-strone-offline-localstorage/ Ten post edytował wNogachSpisz 5.03.2011, 05:38:54 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 7.10.2025 - 19:58 |