Re: [nodejs] refresh browser

27 views
Skip to first unread message
Message has been deleted

Ryan Schmidt

unread,
Jun 13, 2016, 10:55:23 AM6/13/16
to nod...@googlegroups.com

On Jun 13, 2016, at 4:42 AM, Sirine Ibn Fraj wrote:

> I want to refresh my browser automatically when a file changes , how can i do that without adding plugins to my browser

You could use socket.io, or other websocket method, to maintain a persistent connection between the web page and the server. The server can then use that connection to inform the web page when something on the server has changed, and you can program the web page to react accordingly.

aria

unread,
Jun 13, 2016, 10:56:28 AM6/13/16
to nodejs


On Monday, June 13, 2016 at 8:51:34 AM UTC-4, Sirine Ibn Fraj wrote:
Hey 


I want to refresh my browser automatically when a file changes , how can i do that without adding plugins to my browser 


there's a bunch of tools for this: the term to search for is 'live reload'

Most of them have you insert some snippet of javascript in the head of your pages that maintains the connection to the file-watching server. Lots of ways it's integrated, depending on framework and such, but worth a look.

Aria 
Reply all
Reply to author
Forward
0 new messages