473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

IE Client Performance Question

Hi,

I have an aspx page with about 2000 rows of javascript code before the Body
TAG. This is starting to get so much that it's affecting the Loading time on
the client for the page and I'm thinking about hwo to make this go faster.

Besides cutting in the Javascript code and removing "//" Remarks and using
very Short Variable names and stuff I don't really know what to do.

What if I would to put the Javascript oin a separate JS file, would that
affect the loading in anyway? I guess the page has to request that JS file
then but does it have to request the whole page only the function in the
actually Runtime when calling the function?

Is it also possible to force the JS file to be Cached on the Client? or
would it be by default since the JS file will very seldom change.

Please help

best regards
/Lars

Nov 19 '05 #1
3 915
Lars,

It is a good idea to take javascript out into a separate file even if it
contains 20 lines of code. The same applies to the stylesheets. For the
simple reason that these external files don't change often and they will be
cached on client. It will happen by default.

Eliyahu

"Lars Netzel" <ui****@adf.se> wrote in message
news:OD**************@TK2MSFTNGP15.phx.gbl...
Hi,

I have an aspx page with about 2000 rows of javascript code before the Body TAG. This is starting to get so much that it's affecting the Loading time on the client for the page and I'm thinking about hwo to make this go faster.

Besides cutting in the Javascript code and removing "//" Remarks and using
very Short Variable names and stuff I don't really know what to do.

What if I would to put the Javascript oin a separate JS file, would that
affect the loading in anyway? I guess the page has to request that JS file
then but does it have to request the whole page only the function in the
actually Runtime when calling the function?

Is it also possible to force the JS file to be Cached on the Client? or
would it be by default since the JS file will very seldom change.

Please help

best regards
/Lars

Nov 19 '05 #2
ok, thanx

But then the performance depends very much on how the Cache settings are set
up on the client I guess, which is fine but I just want to make sure. Or is
this possible to force somehow?

I know in traditional Asp there are some Cache directives you can set in the
begining on the page in <% % > blocks... can this be done for JS files and
make the client NOT checking so often for this?

/Lars

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OZ**************@TK2MSFTNGP12.phx.gbl...
Lars,

It is a good idea to take javascript out into a separate file even if it
contains 20 lines of code. The same applies to the stylesheets. For the
simple reason that these external files don't change often and they will
be
cached on client. It will happen by default.

Eliyahu

"Lars Netzel" <ui****@adf.se> wrote in message
news:OD**************@TK2MSFTNGP15.phx.gbl...
Hi,

I have an aspx page with about 2000 rows of javascript code before the

Body
TAG. This is starting to get so much that it's affecting the Loading time

on
the client for the page and I'm thinking about hwo to make this go
faster.

Besides cutting in the Javascript code and removing "//" Remarks and
using
very Short Variable names and stuff I don't really know what to do.

What if I would to put the Javascript oin a separate JS file, would that
affect the loading in anyway? I guess the page has to request that JS
file
then but does it have to request the whole page only the function in the
actually Runtime when calling the function?

Is it also possible to force the JS file to be Cached on the Client? or
would it be by default since the JS file will very seldom change.

Please help

best regards
/Lars


Nov 19 '05 #3
if you store your script files as "*.js" then they will cache correctly.
note: if you include you script as a seperate file, you can not call
(reliably) the defined functions until onload event fires. this is becuase
the script files and images is loaded by a seperate thread. the onload fires
after the page is parsed, and linked content (such as script files) has been
loaded.

-- bruce (sqlwork.com)

"Lars Netzel" <ui****@adf.se> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
ok, thanx

But then the performance depends very much on how the Cache settings are
set up on the client I guess, which is fine but I just want to make sure.
Or is this possible to force somehow?

I know in traditional Asp there are some Cache directives you can set in
the begining on the page in <% % > blocks... can this be done for JS
files and make the client NOT checking so often for this?

/Lars

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OZ**************@TK2MSFTNGP12.phx.gbl...
Lars,

It is a good idea to take javascript out into a separate file even if it
contains 20 lines of code. The same applies to the stylesheets. For the
simple reason that these external files don't change often and they will
be
cached on client. It will happen by default.

Eliyahu

"Lars Netzel" <ui****@adf.se> wrote in message
news:OD**************@TK2MSFTNGP15.phx.gbl...
Hi,

I have an aspx page with about 2000 rows of javascript code before the

Body
TAG. This is starting to get so much that it's affecting the Loading
time

on
the client for the page and I'm thinking about hwo to make this go
faster.

Besides cutting in the Javascript code and removing "//" Remarks and
using
very Short Variable names and stuff I don't really know what to do.

What if I would to put the Javascript oin a separate JS file, would that
affect the loading in anyway? I guess the page has to request that JS
file
then but does it have to request the whole page only the function in the
actually Runtime when calling the function?

Is it also possible to force the JS file to be Cached on the Client? or
would it be by default since the JS file will very seldom change.

Please help

best regards
/Lars



Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: CT | last post by:
Hi, This might seem like a basic question but I have some doubts, please humour me. I have a client-server application using java where each client on each machine needs to directly...
6
by: Naveen Mukkelli | last post by:
Hi, I'm working on a client/server application. In the current design, a new thread will be spawn, both on server and client side, to process every packet received. As both client and...
0
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
5
by: Papanii Okai | last post by:
Hi Guys, As we wall know Atlas is a fairly new feature everyone is talking about (atleast at my school). Even though the idea of Ajax has been used in the past i was wondeing if anyone could...
10
by: Pieter Coucke | last post by:
Hi, What's in general the most performant for a VB.NET Windows Forms (2.0) application: - a fat client (everything one the client, the server hosts only the database) - a smart client (an...
6
by: Simon Harvey | last post by:
Hi everyone, We have a need to make a Windows Forms (2.0) client application that will be installed on our clients site. The data that the application uses needs to be centrally available to a...
3
by: PJ6 | last post by:
CSS pseudoclasses are too limiting at the moment (epspecially for IE), so when I'm authoring say, a grid control, I believe there are only two possibilities - one, emit javascirpt for each cell, or...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.