473,404 Members | 2,179 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,404 software developers and data experts.

Browser Refresh needed for .js and HTML??

Hello to all ;-)

I am using the Visual Studio 2005 .NET framework.

Basically, I have file that is served up as an HTML file on the client
side (generated from a .aspx file). But - the HTML file is using
javascript to implement a button click (on the client side).

Ex:
<INPUT onclick="alert('about to start'); process_table('FrmX1',
'FDepents'); " type="button" value="SAVE" >

Well, whenever I make changes to the file called "row_functions.js"
(the file containing the function "process_table"), I find that I need
to hit the "Refresh" button in the browser (Internet Explorer) in order
for the changes to be recognized.

Is there a way to make sure that the browser refreshes my .js file
automatically? In other words, when I make changes to the .js file, it
would be nice not to hit the browser "Refresh" button - sometimes, I
forget to do so ;-(

What happens for regular developers if they have a *lot* of clients to
serve? Does a change in a .js file mean that you have to contact all
those clients to tell them to hit the "refresh" button in their
browsers?

TIA

Sep 30 '05 #1
7 5638
Check your browser cache settings. I assume you are using IE. See what you
have in the
"Check for newer version of stored pages" option.

"milkyway" <d0******@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hello to all ;-)

I am using the Visual Studio 2005 .NET framework.

Basically, I have file that is served up as an HTML file on the client
side (generated from a .aspx file). But - the HTML file is using
javascript to implement a button click (on the client side).

Ex:
<INPUT onclick="alert('about to start'); process_table('FrmX1',
'FDepents'); " type="button" value="SAVE" >

Well, whenever I make changes to the file called "row_functions.js"
(the file containing the function "process_table"), I find that I need
to hit the "Refresh" button in the browser (Internet Explorer) in order
for the changes to be recognized.

Is there a way to make sure that the browser refreshes my .js file
automatically? In other words, when I make changes to the .js file, it
would be nice not to hit the browser "Refresh" button - sometimes, I
forget to do so ;-(

What happens for regular developers if they have a *lot* of clients to
serve? Does a change in a .js file mean that you have to contact all
those clients to tell them to hit the "refresh" button in their
browsers?

TIA

Sep 30 '05 #2
Thank you again for the reply ;-)

But where can I find this setting? Also, what do developers do if there
is change in a .js file and it has to be distributed to many front
ends? I was wondering ...
Raul Macias wrote:
Check your browser cache settings. I assume you are using IE. See what you
have in the
"Check for newer version of stored pages" option.

"milkyway" <d0******@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hello to all ;-)

I am using the Visual Studio 2005 .NET framework.

Basically, I have file that is served up as an HTML file on the client
side (generated from a .aspx file). But - the HTML file is using
javascript to implement a button click (on the client side).

Ex:
<INPUT onclick="alert('about to start'); process_table('FrmX1',
'FDepents'); " type="button" value="SAVE" >

Well, whenever I make changes to the file called "row_functions.js"
(the file containing the function "process_table"), I find that I need
to hit the "Refresh" button in the browser (Internet Explorer) in order
for the changes to be recognized.

Is there a way to make sure that the browser refreshes my .js file
automatically? In other words, when I make changes to the .js file, it
would be nice not to hit the browser "Refresh" button - sometimes, I
forget to do so ;-(

What happens for regular developers if they have a *lot* of clients to
serve? Does a change in a .js file mean that you have to contact all
those clients to tell them to hit the "refresh" button in their
browsers?

TIA


Oct 1 '05 #3
What is it that you are trying to do in the function?
It may be a better idea it process this server side in an event in your cde
behind file?

At way you wont have the issues of cached .js files.

Or the other option would be to remove the javascript finction from the .js
file and place that code in the Form1.aspx page .

HTH

Clarke Scott

"milkyway" <d0******@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hello to all ;-)

I am using the Visual Studio 2005 .NET framework.

Basically, I have file that is served up as an HTML file on the client
side (generated from a .aspx file). But - the HTML file is using
javascript to implement a button click (on the client side).

Ex:
<INPUT onclick="alert('about to start'); process_table('FrmX1',
'FDepents'); " type="button" value="SAVE" >

Well, whenever I make changes to the file called "row_functions.js"
(the file containing the function "process_table"), I find that I need
to hit the "Refresh" button in the browser (Internet Explorer) in order
for the changes to be recognized.

Is there a way to make sure that the browser refreshes my .js file
automatically? In other words, when I make changes to the .js file, it
would be nice not to hit the browser "Refresh" button - sometimes, I
forget to do so ;-(

What happens for regular developers if they have a *lot* of clients to
serve? Does a change in a .js file mean that you have to contact all
those clients to tell them to hit the "refresh" button in their
browsers?

TIA

Oct 1 '05 #4
You could try the old random number trick in the aspx file. Code a
random number to be appended to the end of the js file src string in
the html output. So you would end up with this in the html:

<SCRIPT TYPE="text/javascript"
SRC="row_functions.js?nocache=109435987234">

Oct 1 '05 #5
Hi Clarke - and thanks ;-)

Clarke Scott wrote:
What is it that you are trying to do in the function? I am doing checks (using regular expression) of the data entered on the
HTML page. It was my understanding that user-entry checks should happen
on the client side so as to prevent so much hitting on the server.
It may be a better idea it process this server side in an event in your cde
behind file?

The code is being used in several .HTML files. So, I placed all data
checks into one file (the .js) and import it into each HTML file being
used.

Oct 1 '05 #6
Thanks for the help Jamba but where does the 109435987234 number come
from and what does the attribute "nocache" do in this case?

Jambalaya wrote:
You could try the old random number trick in the aspx file. Code a
random number to be appended to the end of the js file src string in
the html output. So you would end up with this in the html:

<SCRIPT TYPE="text/javascript"
SRC="row_functions.js?nocache=109435987234">


Oct 1 '05 #7
>>You could try the old random number trick in the
aspx file. Code a random number to be appended
to the end of the js file src string in the html output.
So you would end up with this in the html:
<SCRIPT TYPE="text/javascript"
SRC="row_functions.js?nocache=109435987234">


Thanks for the help Jamba but where does the
109435987234 number come from and what
does the attribute "nocache" do in this case?


The number is a random number that you generate every time the page is
served. The attribute does nothing other than trick the browser into
thinking that the .js file must be retrieved every time instead of
cached. It didn't have to be called "nocache"; it could have been
"?MilkywayWuzHere=468735168576511"...

Oct 2 '05 #8

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

Similar topics

4
by: vickie_raven | last post by:
is there any way to force a refresh of a page that a user visits?? sorry i am still learning. vickie
2
by: Jaikanth Sithambaranathan via .NET 247 | last post by:
The problem is in the result page in which i can scroll throughthe contents of the result set 100 at a time. I call the resultpage from a filter page where i accept filter on results to bedisplayed....
7
by: milkyway | last post by:
Hello to all ;-) I am using the Visual Studio 2005 .NET framework. Basically, I have file that is served up as an HTML file on the client side (generated from a .aspx file). But - the HTML...
2
by: Amelyan | last post by:
How do you prevent browser "Refresh" action from repeating the last operation (e.g. button click event) of my aspx page?
1
by: Dabbler | last post by:
What effect does the browser refresh button have on a) session variables and b) viewstate? My page loads info based on session variables and it seems this breaks when someone does a page...
2
by: pingalkar | last post by:
In my application, on one form i m getting information from user and save this information , after saving this information again we loading that page. (At this moment if any one try to refresh this...
4
nateraaaa
by: nateraaaa | last post by:
I have an admin application that allows the user to enter information and click a Save button. In the click event of the save button I call an insert stored proc. If the insert proc is successful I...
0
by: neo2020 | last post by:
Hi all, Is it possible for us to detect the browser refresh event ? I am thinking of comparing the current browser loaded URL with the target url. If they are the same, then imply it is an refresh...
8
by: charithstudy | last post by:
hi, I have login page , userid and password , when i entered values into them and click browser refresh in MOZILLA , password field clears but userid field text doesnt clears, how to clear...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.