friendlyposter
Programmer
Peersistence is to keep something for reference while the user (or the script) goes from page to page.
javascript sometimes needs to retain data and cannot always resort to one method e.g. server-side data retention.
The forum has no FAQ I could found giving best practices for retaining data between web pages.
There are so many possibilities - most of which are overkill for a small data item - and some of which rely on cookies that the user may not want - and even some that rely on a user login and a server-side data base keeping data in a user profile.
I have seen
- cookie data
- hidden INPUT items with data kept in form fields
- hidden frames
- visible frames that have input values or HTML spans or variables set that are kept unchanged as subframes change
- use of the URL (even the #href) to keep limited encoded data
Can we share your own thoughts ... or your awareness of good source material.
It's not just about new tricks - it's about guidelines and best practices and when to use each of the various methods.
javascript sometimes needs to retain data and cannot always resort to one method e.g. server-side data retention.
The forum has no FAQ I could found giving best practices for retaining data between web pages.
There are so many possibilities - most of which are overkill for a small data item - and some of which rely on cookies that the user may not want - and even some that rely on a user login and a server-side data base keeping data in a user profile.
I have seen
- cookie data
- hidden INPUT items with data kept in form fields
- hidden frames
- visible frames that have input values or HTML spans or variables set that are kept unchanged as subframes change
- use of the URL (even the #href) to keep limited encoded data
Can we share your own thoughts ... or your awareness of good source material.
It's not just about new tricks - it's about guidelines and best practices and when to use each of the various methods.