Hi,
Where did you get this action?
typically, you need to bypass the cache ( which is likely the issue), and so everytime you check, the url you use to access internet and check the result must be different always.
this is done by appending a dummy url variable like &time=123123
where 123123 is the current time, and so you won't hit any caching issue.
Bye,
Jean