All Answers

All Answers » Re: Client page update? » Comments for "Re: Client page update?"
  • Darren
    Hi Luca, The samples don’t work. They are not automatically refreshing. I’m using VS2012 pro on win 7, 64-bit. Oddly, the page refreshes when I click anywhere within it. How do I fix this? Do I have just to enable websockets? (if so, how?) Once I do that, do I then ensure I write Application.Update(me) whenever I want to update the client? Sorry, so many questions. The demos work fine on my home, Win-10 laptop – so I assume this has “something” enabled/installed that my Win 7 dev. machine doesn’t!? Thanks Darren
  • Luca (ITG)
    Win7 doesn’t support WebSocket.
  • Darren
    OK, this is a new issue to me so be gentle! :-) Application.StartPolling(1000) seems to work on my Win 7 machine, but does this means that I can never achieve a refresh rate of faster than 1 second on a Win 7 client? In other words, the refresh rate of a page will vary according to the client’s windows version? How is this scenario best handled in the app.? Should you test for Windows version on startup and adjust your Application.Update/Polling accordingly? Thanks
  • Luca (ITG)
    StartPolling starts a timer on the client when WebSocket is not support. It requests for updates from the client. When websocket is supported there is no refresh rate, updates are pushed.
  • Darren
    Hi Luca, Ok, but how Is the decision made to implement StartPolling or not in the app.? Should the app. test the Winversion on start-up, & if Win7 server then StartPolling & if win8 or 10 then don’t do anything!? Not sure how to make the decision. Cheers
  • Luca (ITG)
    StartPolling is ignored when WebSocket is supported. So if you are ok with polling you can use it when you know that your code starts a background task that needs to update the client and stop it when the background tasks ends. If the client and server are using WebSocket it’s simply ignored. The vast majority of browsers support websocket. All servers also support it unless they are running on < windows 8.
  • Darren
    By the way, I think there should be an obvious note on your samples which warns about page refreshing. The sort example doesn’t appear to work on a win7 machine, for example… & this threw me. I thought there was something wrong with my pc! Quite a big issue I would have thought? Cheers
  • Luca (ITG)
    I don’t think I have see a Win7 machine in a long time! :)
  • Darren
    Ok. So, Are you saying we should ALWAYS use polling for background tasks – just in case? Is that a safe & legitimate thing to do?
  • Darren
    Win 7 is still very much used in industry. We still have to support it… like it or not! :-O
  • Luca (ITG)
    If the background task updates the UI and if you know that your client browsers may not support WebSocket then yes – but it’s under your control when to start it end it. On the server side you should always support it. If you deploy embedded wisej servers on W7 and the conditions above apply then yes. You can also simply use a timer component dropped on a form/page. There are several possibilities.