Mobile app version of vmapp.org
Login or Join
Frith620

: No cache and Google AdSense performance I'm developing a page where I need to avoid JavaScript caching by browser. I've added this header: <?php header('Cache-Control: no-cache, no-store, must-revalidate');

@Frith620

Posted in: #Cache #GoogleAdsense #Javascript

I'm developing a page where I need to avoid JavaScript caching by browser. I've added this header:

<?php
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
?>


After this, browsers didn't cache more JavaScript sorting out the issue, but in the same time I noticed a drop in Google AdSense RPM.

Then I removed the added code and now Google AdSense RPM is reaching again a good value.

So, how could I avoid JavaScript caching without meddle with AdSense performance?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Frith620

1 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas447

Rather than trying to avoid Javascript caching, which is not very natural, I would try to fetch the 'variable data part' as a JSON using Ajax for example.

If Google can't be sure what your Javascript is all about (since you configuration means it can change each time), then it cannot trust it. Hence, rather than taking a RPM risk, it will take the safe road and give the RPM to other sites it can trust.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme