SXG tests

ASX cache poisoning demo

  • Open Network tab in Chrome Dev Tools.
  • Click this button few times until you see CORS errors at least 2 times. It means, the local ASX cache in Cloudflare datacenter near Google has been poisoned with a subresource Google can't cache for about 3 minutes.
  • Click it once, to make subresource cachable by Google.
  • Click it once to remove the subresource from Cloudflare cache. This way the next time Google downloads this subresource, it would be able to cache it.
  • Now we try to pretech another, fresh document referring the subresource, that is Google-cacheable now.
  • Hit the button few times until you observe SXG requests at least 2 times. Observe unexpected CORS errors.
  • You may check status of the subresource in Cloudflare cache by clicking this button. The HIT means it was accessed by Google or you. If Google accessed it, it means it tried to cache it, but failed, regardless the subresource is valid. Note: checking the status means accessing the subresource, so the next check will return HIT.
  • Wait 5-10 minutes for the SXG-wrapped subresource to expire from local ASX cache in Cloudflare datacenter near Google.
  • Click the button and observe the CORS error are gone.
  • For the full explanation see this article.