473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Data persistence and refresh

I have a piece of elearning where users move from screen to screen. The
content itself is displayed within an IFRAME with the parent window
containing the various navigation controls and javascript.

I did it this way because there's a substantial amount of javascript
that gets loaded and a significant amount of data that gets created as
the user moves about the lesson.

All seems well and good until the user refreshes the screen. Then all
the various objects are initialised and the data tracking gets trashed.

I tried using single pages where the data gets written to cookies but:
- I'm unsure it will handle the amount of data a user may generate
- There's a 5+ second lag as the screen clears and is rebuilt between
clicks on the "next" button. Here I thought that the scripts, navigation
elements, background images would be cached and so would not be a
problem but this does not appear to be the case.

Is there a "good" way to have a site that consists of many pages where a
large amount of data is accumulated as the users moves about the site
but is not lost if the user refreshes the page?

Andrew Poulos
Oct 27 '08 #1
3 2268
On Oct 27, 8:33*am, Andrew Poulos <ap_p...@hotmail.comwrote:
>
Is there a "good" way to have a site that consists of many pages where a
* large amount of data is accumulated as the users moves about the site
but is not lost if the user refreshes the page?

Andrew Poulos
Not client-side storage. Not yet. Persistent client-side storage
(nowadays) can only be achieved cross-browser by cookies. And cookies
aren't a good solution because they have a length limit (~4k ISTM),
and what's worse, the info that you put into a cookie gets sent in the
headers of each and every request to that domain, unless you carefully
adjust/plan the paths of both the cookies and the requests that you
make.

The future will hopefully bring other persistent client-side storage
solutions. Safari already implements both the "localStorage" api of
the whatwg html5 proposal: <http://www.whatwg.org/specs/web-apps/
current-work/#the-localstorage-attribute>, and the persistent SQL-
client-side database storage api <http://www.whatwg.org/specs/web-apps/
current-work/#sql>. IE has other things of its own, activeX controls
or something I think.

So, given the situation, for large amounts of data, you'd probably
better save session state/data server-side, and use a light-weight
client-side cookie as a session id.

--
Jorge.
Oct 28 '08 #2
On 2008-10-28 15:56, Jorge wrote:
So, given the situation, for large amounts of data, you'd probably
better save session state/data server-side, and use a light-weight
client-side cookie as a session id.
Yes, that's probably the best advice in this situation. Just for the
record, it's possible to store pretty large amounts of data using Flash.
Depending on the setup the same data store could even be available from
different browsers.
- Conrad
Oct 28 '08 #3
Conrad Lender wrote:
On 2008-10-28 15:56, Jorge wrote:
>So, given the situation, for large amounts of data, you'd probably
better save session state/data server-side, and use a light-weight
client-side cookie as a session id.

Yes, that's probably the best advice in this situation. Just for the
record, it's possible to store pretty large amounts of data using Flash.
Depending on the setup the same data store could even be available from
different browsers.
Flash isn't necessary, some recent browsers provide Storage and friends.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 28 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
7
by: Steve Mauldin | last post by:
I have a public variable that is declared in a public module. This Variable is stored into a Session variable and used to pass data from page to page. I am seeing on my local development box that...
3
by: Kevin | last post by:
I have a Windows Forms app with a form that displays/updates student data. When it activates I fill a DataTable with just the names of the students from a table of about 10,000 names. I have...
0
myusernotyours
by: myusernotyours | last post by:
Hi all, Am trying to create a Java Desktop App that uses Java Persistence in Netbeans. The database is MS Access but I tried with Mysql and got the same error. When I run the app( Create the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.