Link to home
Create AccountLog in
Avatar of prsn
prsnFlag for Puerto Rico

asked on

How to autorefresh a TXT file on website

Hello experts

We have a .txt file on our webserver that is refreshed every 20 sec for aprox 3 or 4 hours. After that the file is no longer updated. When the user clicks on the link it will open that .txt file however to get the latest update the user will need to refresh the browser. Around 90% of our users will be using cell phones or tablets.

Is there a PHP / Jquery/ javascript or any easy solution to get this done?
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Having said that, please be aware that data coming from the server to a mobile device has a battery cost that is about 10x the same data coming from storage in the mobile device.  Sorry, I have no citation for this, but I believe it to be true.  So for the sake of your users you might consider telling them the last time the data was updated, or whether it is still being updated.  You might give them the option to turn on automatic polling or to work manually, and just use what they got most recently.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of prsn

ASKER

Hello Everyone

Thanks for the reply and recommendations. I will try your options to see which one one suit our needs.