473,811 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
1 1701
In article <11************ **********@z14g 2000cwz.googleg roups.com>,
"Tim" <ti*******@yaho o.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1432
by: james | last post by:
I am new to php and need some help getting the session variables into include files. (after-thought, Sorry for the drawn out post but I really, really need help....;) Here's what I'm doing.. I have a php request_form that I use 2 different ways: by itself (url directly to the form) and as an include to be displayed in existing php pages. This form uses POST to another php_script that performs serverside validation and db write. If all...
7
5078
by: Sherry Littletree | last post by:
Hi All I am working on a site that has a large amount of common html on all its web pages. I am looking for a way to place this in a single file so, if changes are made, I can change this single file and do not have to change each and every page. I have the Java scripting in a common .Js file but have not been able to find a way to do this with my html content.
26
15320
by: Don | last post by:
I'm writing an html page with some JavaScript that reads a web page into a client-side temp file, then reformats it, then submits that same file as a URL to the browser for display, via "locate.replace". I can do all this if the html page containing the script originates on the client machine, but don't know how to get access to a client-side temp file when the same html page containing the script is on a web host. How do I get access...
23
11431
by: batels | last post by:
Hey All, I'm a bit new at this,and i tryed seraching google about it but i didn't quite got a solution. I'm writing an HTML page that needs to check if another html file exist (in the same folder) and if not,to call to a C file and create that html file. I tryed to do that with JavaScript but i understood there is no such option. Can u advice? and once i know that file doesn't exist,can i call to a C file from a
10
2652
by: Kleenex | last post by:
Reason: I am working on an embedded project which has very limited memory (under 512 bytes, 60 or so of which is stack space), which translates into limited stack space. In order to save on stack space, I tried to only use parameters and stack space for things which are truely temporary. Instead of passing a pointer to a data structure which should always be populated with data, I have the data structure declared as a global variable and...
6
1633
by: JDP | last post by:
First off let me say that http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp would not work as I see it. Right off, I can't have a cookie. Anyway, another solution suggests using hidden form fields only helps me to know that there is a way, I don't know how to pass a hidden form field from my clasic ASP to ASP.Net
13
3570
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
3
1909
by: vunet.us | last post by:
Hello, I am breaking my head running out of ideas about the best solution to my goal. I want to load some pages generated with the server (ASP) and assign their html results to JavaScript, so users could click the links and the content of any selected page would show up immediately, making no requests. So, I have one main page called mainpage.asp which, I think, should get all subpages with content, names are subpage1.asp, subpage2.asp,...
19
1994
RMWChaos
by: RMWChaos | last post by:
Previously, I had used independent JSON lists in my code, where the lists were part of separate scripts. Because this method did not support reuse of a script without modification, I decided to consolidate all my JSON lists into one and modify my scripts so that they were more generic and reusable. So far so good. The problem is that my JSON lists used variables for many pieces of code that performed multiple iterations to create several...
0
9734
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10401
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10416
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5567
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5704
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3029
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.