setInterval not auto refreshing.
Not sure what the issue is. I am using setInterval auto refresh data. The page is not actually going to the route. It seems like it is just reloading the old data.
Flask endpoint
@mod.route('/autoloaddata/', endpoint='autoloaddata')
I do an initial load when you first visit the page. Which works.
$(function(){
$("#loaddata").load("{{ url_for('datapage.autoloaddata') }}");
});
setInterval(function()
{
$('#testreload').load("autoload/");
$('#currentmap').load("autoload/");
}, 30000);
Looking at my console window `https://example.com/datapage/autoloaddata/` is coming back. But with the original load data. Its not hitting the route again.
if I copy the link from my console it hits the route and brings back new data.
/r/flask
https://redd.it/8brms4
Not sure what the issue is. I am using setInterval auto refresh data. The page is not actually going to the route. It seems like it is just reloading the old data.
Flask endpoint
@mod.route('/autoloaddata/', endpoint='autoloaddata')
I do an initial load when you first visit the page. Which works.
$(function(){
$("#loaddata").load("{{ url_for('datapage.autoloaddata') }}");
});
setInterval(function()
{
$('#testreload').load("autoload/");
$('#currentmap').load("autoload/");
}, 30000);
Looking at my console window `https://example.com/datapage/autoloaddata/` is coming back. But with the original load data. Its not hitting the route again.
if I copy the link from my console it hits the route and brings back new data.
/r/flask
https://redd.it/8brms4