Active Client Pages: More Questions and Answers on Chrys`s Approach
This is the third part of my series, "Active Client Pages: Chrys’s Approach." We continue to learn the roots that give rise to my approach to Active Client Pages. We will also answer more questions about the technique and its capabilities.
In ACP the first page is downloaded and displayed in the normal way when you type the address in the browser and click Go. The data for any subsequent page in the session is downloaded in advance and kept in the master page. Where this information is kept in the master page is called a store. The store consists of JavaScript variables and/or JavaScript arrays and/or JavaScript object properties. The pages in the session -- except for the first -- are developed at the client browser with information from the store. The Document Phase of Chrys’s Approach does not follow this description strictly.
How can we store data in the Master Page of the document phase of Chrys’s Approach?
As we have seen, script in the loaded document cannot access information in the previous document. It cannot access JavaScript variables, JavaScript arrays or JavaScript object properties in the previous page. It cannot access the content of HTML elements in the previous page. So how can we have data stored in the master page and have them retrieve from a loaded page?
The solution may lie in the use of cookies. The trouble with cookies is that their operation is not standardized. Maybe someone will one day come up with consistency in using cookies as a store; I will not address that. So if we use cookies now, we may have errors with our financial calculations. We have to resort to a moving store. What do I mean by a moving store? Rendezvous in the next part of the series.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.