472,353 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 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 5552
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...
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...
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...
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...
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...
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....
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...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.