Click to See Complete Forum and Search --> : Client Side Questions


centiipede
08-23-2003, 04:21 AM
I am developing a massive reference/help system site using ONLY client side code. My database for the system is a complex 2dimensional array with embedded arrays in some of its entries.

Being client side, will this entire file be 'downloaded' by the user's browser agent when a page that has it linked via script tag:

<script src="jsDB.js"></script>

is viewed?

So if the database grows to say 500+kb etc... all of that will need to be retrieved before the site can be displayed? The file is still very small, so I haven't noticed any lag on slow connections. but... being completely client side... I HAVE to deal with tomorrow today, or I will develop myself into a corner.



thanks!!!!

Nevermore
08-23-2003, 05:55 AM
You will have to download the whole thing before you can use it, but not before you see the page, which could make it seem broken. As a question, why are you using JS for a client side database?

Jupac
08-23-2003, 11:27 AM
<script src="jsDB"></script>
would be better loke this

<script language="JavaScript" type="text/javascript" src="jsDB"></script>

Charles
08-23-2003, 12:47 PM
Originally posted by lakers01
<script src="jsDB"></script>
would be better loke this

<script language="JavaScript" type="text/javascript" src="jsDB"></script> That's incorrect, actually.

Use <script language="JavaScript" src="someScript.js"></script> with HTML 3.2.

Use <script type="text/javascript" src="someScript.js"></script> with HTML 4.01, XHTML 1.0 or XHTML 1.1.

But you shouldn't be using HTML 3.2 anyway. And if you include the "language" attribute then some versions of Netscape will behave in a non-standard way.

AdamBrill
08-23-2003, 05:13 PM
Ok, a couple things...

1. JavaScript should NOT be used for that. 13% (http://www.thecounter.com/stats/2003/May/javas.php) of users have JavaScript disabled, so you are just throwing them out when you use JavaScript for it...

2. JavaScript is MUCH slower at processing... If the file would ever get to be 500+kb, most browsers would lock up.

3. The user would have to download the entire file before they could view the page, thus slowing down the page even more.

I could go on, but I think that is enough. ;) It sounds like you should use server-side code. I would use MySQL with PHP, but you could use any server-side language...

centiipede
08-26-2003, 11:10 AM
My idea was to make a portable help system, that is html based, and hand coded by me, so that it is as w3c compliant as I can get it, and it would be smaller than html help generated by apps like Robohelp. An older version of this project is here:

http://devarchive.port5.com/

I will try building a server side version of this, but I think that I will continue with this version as well, and make it available in applications or for downloading.


thanks for the feedback!