Saturday, August 06, 2005

A Positive TabletPC Note... & Cookies

Well, after a bad first week with my tablet, and several emergency restores... *crossing my fingers* *knocking on wood* I believe the problems have gone away on their own. We'll see if anything happens over the weekend... but anyhow, on to my project.

I've completed a basic write/read/parse cookie javascript functions that will be part of my design. At first I was going to implement already made routines, but I found it easier to understand if I wrote it myself so I did. It's not pretty, but a basic hard coded read/write/parse javascript code can be found at the following here.


*the html file will display status checkpoints including key points during the parsing, effectively showing how the parsing is being done at each step. If any problems occur down the line, this will help me debug it.

Next step is to write some functions that will create the CSS styles on the fly depending on values found in the cookie.

Btw, some research has found that there's some serious limitations to cookies that must be kept in mind. From what I've read, cookies have a 4KB limit (virtually unlimited), but are restricted to only 20 cookies per server/domain. Each variable is treated as a cookie. So my original plan to store each page in its own cookie "variable" would not have worked... which is why the entire site structure is being defined in one cookie "variable" and I'll be using the parser to read the data. The downside to this is that I'll be loading and parsing variables for the entire site that a certain page may not need, so it'll be wasting processing... although it's negligible, it's still bad coding, but it's the only workaround for a fully client-side design and the limitations of cookies.

No comments: