Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently connecting to a server via SFTP so I can edit the files locally and have them uploaded back to the server every time I change / update a file. Well, I'm sick of having to refresh the browser window every time to see these changes.

Are there any apps that will auto refresh for me? I tried LiveReload, but thats only for local files not SFTP.

share|improve this question

migrated from Dec 13 '12 at 11:41

This question came from our site for professional and enthusiast programmers.

I imagine you might be able to do this with WinSCP using a command. – Jared Farrish Dec 13 '12 at 8:16
Is pressing F5 really that much effort? You could have refreshed your page 355 times instead of making this post! ;) But seriously, here are some options:… (Also, is there a reason you can't work in localhost while developing?) – Alan Shortis Dec 13 '12 at 8:19
You could also run a script on the server to implement a web socket (in a browser that supports web sockets, like Chrome or Firefox) and setup a socket interface in Chrome for instance to listen for your SFTP client to notify a file was touched and broadcast back to your page(s) to refresh. Seems roundabout, but it makes sense to me. – Jared Farrish Dec 13 '12 at 8:37

In LiveReload there is an option to "Override URLs to serve modified CSS from localhost". It's under the first options box. It will reload the page when making changes to local files but I've noticed that it has some issues with images not showing up on reload.

share|improve this answer – Jared Farrish Dec 14 '12 at 9:05

You could use the old method of using a meta refresh tag:

<meta http-equiv="refresh" content="600">

This tells the browser to refresh the page every 600 seconds.

Make sure you remove it before pushing your site to it's production environment, nobody likes a surprize refresh ;)

share|improve this answer
Ya, I can't do that since its a live site, but thanks. – Nick Dec 13 '12 at 8:18
Aha, well then I don't know of any other resources :) Good luck! – Kyle Dec 13 '12 at 8:19
Good answer, but I tried in my browser it's 600 seconds but not 600 miliseconds – Teddy Dec 13 '12 at 8:22
Oops, I'll change that, thanks for the heads up :) – Kyle Dec 13 '12 at 8:22
I'd probably suggest some background worker script be injected if coming from an IP or some other identifier for yourself, and instead have a script do a compare of the last to current timestamp for your session. Or have the sFTP client ping a script that pushes the new timestamp for the file to an index accessible by the observing script communicating to your browser file changes. Y'know, easy stuff. – Jared Farrish Dec 13 '12 at 8:47

In addition to Kyle's great answer:

You can use browser plugins to auto refresh pages for you, you can change the interval on the fly unlike the meta tag way of doing things which would require editing the meta tag if the refresh rate is not correct for you.

You can get a list of plugins:

share|improve this answer

Another solution is to build another page to wrap your web page inside an iframe then in the outer page, use js settimeout to refresh. Thus will not impact other users.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.