By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,254 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,254 IT Pros & Developers. It's quick & easy.

How to temp vars or file in javascript for other pages?

P: n/a
Tim
Hi,

We are downloading a few thousand rows of data for users to choose from
and need to speed up the operation. The data is related in four levels.
The current design allows the user to select the first level from about
20 choices and then the next level's choices are retrieved from the
server. This is taking about 4 seconds. We are required to make it
faster.

We need to be able to download all the data once and save it for use
any time this particular page is visited. The app is a support app and
the page will be used throughout the day. The obvious idea is to cache
it in a Java applet but we are not allowed to use applets. The other
idea is to embed it in JavaScript arrays but we have tried this and the
performance penalty is about the same and will be incurred on other
lookups on the page becuase the page reloads for these other lookups
(we are using WebLogic netui).

What we need is a cookie that is not submitted unless the page
explicitly sends it; that is, some data needs to be downloaded once per
session and remain in the browser memory/on the disk throughout the
session. It would be nice if we could write to a temp file or access a
heap - can we? Any ideas?

Thanks!
TimJowers

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <11**********************@z14g2000cwz.googlegroups .com>,
"Tim" <ti*******@yahoo.com> wrote:
Hi,
Just some random thoughts...
We are downloading a few thousand rows of data for users to choose from
and need to speed up the operation. The data is related in four levels.
The current design allows the user to select the first level from about
20 choices and then the next level's choices are retrieved from the
server. This is taking about 4 seconds. We are required to make it
faster.
Have you tired not sending down all the data and getting it from the
host when you need it?

You would
1) create a hidden iframe
2) read the data into the iframe via creating dummy pages
3) add an onload event handler in the dummy page to copy the data over
to the displayed page.

Here is another way of getting data from the server.
http://jibbering.com/2002/4/httprequest.html
We need to be able to download all the data once and save it for use
any time this particular page is visited. The app is a support app and
the page will be used throughout the day. The obvious idea is to cache
it in a Java applet but we are not allowed to use applets. The other
idea is to embed it in JavaScript arrays but we have tried this and the
performance penalty is about the same and will be incurred on other
lookups on the page becuase the page reloads for these other lookups
(we are using WebLogic netui).
Ideas:
1) Did you try putting the array in a javascript include file (.js)?
That way the include file should stay cached.

Perhaps there is a better way of encoding the downloaded data. Maybe
for instance one long string is parsed by the interpreter faster than a
bunch of short strings.

If you used one long string, you would have to devise some way of
accessing the data. This wouldn't be too hard if you could force the
data to be fixed length or provide an index.

2) Stash the data in the first web page and have all the other web pages
read the data from this page.

You can read data from the parent window in a popup and between frames.
Maybe you could put a small frame on the window, place the data in the
small frame, then read from the frame from all the other pages in the
large frame. I am not big on frames, but I think you could make a small
frame somewhere on the screen in place of a blank line. Frames of zero
size show up in IE. Of course, frames cause there own set of problems.

What we need is a cookie that is not submitted unless the page
explicitly sends it;
Cookies are limited to a small amount of data.
that is, some data needs to be downloaded once per
session and remain in the browser memory/on the disk throughout the
session. It would be nice if we could write to a temp file or access a
heap - can we? Any ideas?
There is proprietary code for reading and writing to disk, but Netscape
uses java and in IE uses activex. The user with normal security setting
will get warning about this.

Thanks!
TimJowers

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.