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

Browser Refresh needed for .js and HTML??

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
>>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 discussion thread is closed

Replies have been disabled for this discussion.