: 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');
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?
More posts by @Frith620
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.