How to update an Adsense div in x seconds without refreshing the page

Asked

Viewed 158 times

-1

I have a site with ads from Adsense, wanted a script or javascript or php to update it x in x seconds, a loop. On a 30-second basis.

1 answer

-1

Hello!

Without updating the page you will need to use some ajax, and to do this x load in X second, you can use setInterval, follow references for you to base:

Document

Documentation setInterval

With respect to Adsense, you would have to see how you are inserting it on the page currently, so I remember it is Google itself that provides the ad code, so you will need to read also in its documentation: Documentação Adsense

Browser other questions tagged

You are not signed in. Login or sign up in order to post.