
September 30th, 2005, 07:25 AM
| | | 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 | 
September 30th, 2005, 09:25 PM
| | | Re: Browser Refresh needed for .js and HTML??
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" <d0mufasa@hotmail.com> wrote in message
news:1128060906.753056.94390@g44g2000cwa.googlegro ups.com...[color=blue]
> 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
>[/color] | 
October 1st, 2005, 08:15 AM
| | | Re: Browser Refresh needed for .js and HTML??
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:[color=blue]
> 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" <d0mufasa@hotmail.com> wrote in message
> news:1128060906.753056.94390@g44g2000cwa.googlegro ups.com...[color=green]
> > 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
> >[/color][/color] | 
October 1st, 2005, 08:25 AM
| | | Re: Browser Refresh needed for .js and HTML??
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" <d0mufasa@hotmail.com> wrote in message
news:1128060906.753056.94390@g44g2000cwa.googlegro ups.com...[color=blue]
> 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
>[/color] | 
October 1st, 2005, 07:25 PM
| | | Re: Browser Refresh needed for .js and HTML??
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"> | 
October 1st, 2005, 09:45 PM
| | | Re: Browser Refresh needed for .js and HTML??
Hi Clarke - and thanks ;-)
Clarke Scott wrote:[color=blue]
> What is it that you are trying to do in the function?[/color]
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.
[color=blue]
> It may be a better idea it process this server side in an event in your cde
> behind file?[/color]
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. | 
October 1st, 2005, 09:45 PM
| | | Re: Browser Refresh needed for .js and HTML??
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:[color=blue]
> 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">[/color] | 
October 3rd, 2005, 12:55 AM
| | | Re: Browser Refresh needed for .js and HTML??
>>You could try the old random number trick in the[color=blue][color=green]
>>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">[/color]
>
>Thanks for the help Jamba but where does the
>109435987234 number come from and what
>does the attribute "nocache" do in this case?[/color]
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"... | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 205,248 network members.
|