locked
WebView autofresh

    Question

  • Hello,

    I have placed banner of one ad network, I need to refresh it every 60 seconds, what is the best way to implement it?

    Wednesday, September 3, 2014 3:42 PM

Answers

  • Yes. That would work within the control's HTML.

    To implement a timer you can use the DispatcherTimer class . This will only run when the app is running, not in the background. When the app is in the background it won't have any UI to update.

    • Marked as answer by Andev Thursday, September 4, 2014 9:14 AM
    Thursday, September 4, 2014 6:46 AM
    Owner

All replies

  • You can either refresh it from within the HTML or run an external timer and navigate the WebView to the new URL. Which is best depends on your specific app and scenario
    Wednesday, September 3, 2014 4:02 PM
    Owner
  • how can I implement timer in the Windows Store app? Is it background task? Will it work if app is not visible?

    I forgot about this good way :)

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

    • Edited by Andev Wednesday, September 3, 2014 4:33 PM
    Wednesday, September 3, 2014 4:31 PM
  • Yes. That would work within the control's HTML.

    To implement a timer you can use the DispatcherTimer class . This will only run when the app is running, not in the background. When the app is in the background it won't have any UI to update.

    • Marked as answer by Andev Thursday, September 4, 2014 9:14 AM
    Thursday, September 4, 2014 6:46 AM
    Owner