<script type="text/javascript" src="test.php"></script>
The first time I visit that page,test.php is not visited,
but if I refresh the page,it'll get run.
Have you ever experienced this ?
it should be "what will be happening?" (future progressive form) that describes an ongoing or continuous action that will take place in the future. always used with "will be" or "shall be", with the verb form ending in 'ing'.
When asking what has occurred in the past, we say, “What happened?” If we were to ask what will occur in the future, we would say, “What will happen?” And if we wanted to know what is occurring at the present moment, then we'd ask, “What is happening?” It is never proper grammar to say “What happen?”
You never can tell what will happen. We never can tell what will happen. Who knows what will happen to us? He looks to see what will happen on the morrow.
It will happen when test.php is cached locally or remotely.
As Tor and Silky said, it's most likely caused by the page being cached. If you have Firebug installed, open the "Net" tab when you go to the page and you might see it say "304 Not Modified" - this means it has been cached.
The easiest and most reliable way (in my experience) to stop a file being cached is to add a random query string to it:
<script type="text/javascript" src="test.php?_=46031535"></script>
You'll just have to change it on each page load (either on the server or client side).
Of course, if the caching headers are set up properly on the server, then this shouldn't be an issue, but I've always found this method to be easier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With