0

I have a webpage already opened. Now I have made some changes in my code and I want to push these changes but WITHOUT refreshing the already opened webpage. I am not using sockets or jetty or any other techniques. I found a way here but I want to ask if I use sockets, will these changes be automatically applied to already opened webpage? If not, is there any way around?

Community
  • 1
  • 1
baig772
  • 3,162
  • 11
  • 37
  • 78
  • 1
    sockets are just like ajax in that they are only a method of communication. sockets do allow for a push from the server or you can use ajax and just poll every few seconds for changes. In neither case do they automatically update the page. That is left to you to update the page with what you get back/sent. – Jonathan Kuhn Feb 05 '15 at 20:44
  • you're basically asking "I have a hose. if I water the ground, will a garden suddenly appear?" no. a socket is a data conduit. once the data comes out of the socket, the socket's job is done. it's up to YOUR code to actually do something useful, like update a page. – Marc B Feb 05 '15 at 20:46
  • Thank you for the comment. My question is, lets say if i use `sockets`, do I need to refresh the page to get the latest updated code or it will automatically trigger the refresh call for already opened webpage from server? – baig772 Feb 05 '15 at 20:48
  • @MarcB that's what I am asking. Is there any way to trigger the refresh call from server via any `cron job` or via any other thing that I don't have to refresh my already opened webpage to get the latest code from server – baig772 Feb 05 '15 at 20:50

0 Answers0