Refreshing on AJAX pages
See original GitHub issueI can’t seem to get ads refreshing every 30 seconds and working for ajax pages. I have the ads refreshing but it currently doesn’t work once I change pages two or more times. This is what my code looks like right now.
$('.adunit:not(".display-block")').dfp({ dfpID: '52137663', enableSingleRequest: false, afterAllAdsLoaded: function() { setInterval(function() { jQuery.dfp(); }, '30000'); } });
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
How to stop refreshing page after ajax call? - Stack Overflow
If so - the page is refreshing not because of your code, but because whatever ajax you called manipulated the folder you were...
Read more >Reload or Refresh a Page after Ajax Success using jQuery
You can use the location.reload() method to reload or refresh an entire web page or just the content inside an element. The .reload()...
Read more >Why is my ajax call refreshing the page?
Try using preventDefault() , it's a jQuery function for preventing default actions called by the browser. First you should call an event ...
Read more >What is the differencebetween refreshing the page and ajax ...
Ajax refresh is used to refresh only certain parts of the screen, thus avoiding the loading and rendering of the whole page. In...
Read more >Using AJAX to Refresh a Section of a Page At a Specific Interval
Refreshing only a section of a page instead of reloading the entire page can be a nice touch for the user experience. Beyond...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@boooooooorbs You will need to use some of Google’s native methods in jquery.dfp.js beforeEachAdLoaded callback like such:
@samburgers could you please explain for someone who’s not that code savvy how you did it? 😃