Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
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