How can I configure a page to auto-refresh from time to time?

How can I configure a page to auto-refresh from time to time?

I would also like this feature.

This would very helpful feature to force refresh a page to activate latest updates.

Hi

This can be done in Javascript:

//Auto refreshing a screen...
$(document).on('knack-scene-render.scene_xxx', function(event, scene) {
  setInterval(function(){ 

		window.location.reload;
		
    }, 30000);
});

This code will refresh scene xxx every 30 seconds.

If you prefer to only update a particular view on the page then you could replace window.location.reload with:

Knack.views["view_yyy"].model.fetch();

Which will refresh view yyy (which need to be within scene xxx).

Hope this helps.

Julian

2 Likes