Run a script *every time* whether postback is true or not

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi all,

How would I set up a script to run every time a user comes to a page
(even if they come to the page via the back button)?

Thanks!

Bill
 
How would I set up a script to run every time a user comes to a page
(even if they come to the page via the back button)?

A script? Do you mean a piece of JavaScript?

<head>
<script type="text/javascript">
alert('Hello');
</script>
</head>
 
A script? Do you mean a piece of JavaScript?

<head>
<script type="text/javascript">
alert('Hello');
</script>
</head>

Yes, JavaScript can be called that way, but I'm afraid that's not what
I need.

Let me be more specific: I have a datagrid that I want to update every
time the user comes to the page (including the back button). So far
I've been unsuccessful with this but I was hoping I could somehow
update it with a script which ran every time a user came to the page.
Would that be possible?
 
A script? Do you mean a piece of JavaScript?

<head>
<script type="text/javascript">
alert('Hello');
</script>
</head>

Yes, JavaScript can be called that way, but I'm afraid that's not what
I need.

Let me be more specific: I have a datagrid that I want to update every
time the user comes to the page (including the back button). So far
I've been unsuccessful with this but I was hoping I could somehow
update it with a script which ran every time a user came to the page.
Would that be possible?
 
Bill,
I believe you may be confusing the concept of "running a script" with what
happens when the browser caches a page and you hit the back button and get
the browser's version of the page rather than having it re-requested from
your website.

What you need to do is find the correct cache control settings to emit so
that your pages are not cached by the browser.

Here is an article that covers some caching basics:
http://www.eggheadcafe.com/articles/20060407.asp

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
 
Bill,
I believe you may be confusing the concept of "running a script" with what
happens when the browser caches a page and you hit the back button and get
the browser's version of the page rather than having it re-requested from
your website.

What you need to do is find the correct cache control settings to emit so
that your pages are not cached by the browser.

Here is an article that covers some caching basics:http://www.eggheadcafe.com/articles/20060407.asp

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

Thank you. I will research what you've given me.

Bill
 
Back
Top