Home > Technical & Creative Skills > Programming, Servers & Scripts

Should you set cloudflare to cache html? (2)


04-02-2017 04:44 PM #1 sharingan_eyes (AMC Alumnus)
Should you set cloudflare to cache html?

How important is it to set cloudflare to cache html if you're running pops? It seems like this would really give spy tools a helping hand in crawling your landers.

But if just the content like images and JS is cached as opposed to the html, does that somewhat defeat the purpose of the CDN?

Maybe a middle ground is to have your cdn purged within a certain timeframe. Thoughts?

Thanks


04-03-2017 02:51 PM #2 goshev (Administrator)

Caching html -- if your css/js is in separate files the html caching is not that important as it will be an extremely small file. CloudFlare by default does not cache .html files you will need to check their knowledge base for example page rules which will add .html files caching.

The initial response on landers is important so it will being good if you start caching .html as well. This will lower the initial response time and with that you have higher overall page performance. You can use gtmatrix or similar tool to check your lander performance. Note that any popups or some javascript function that will require any user interaction for the complete page to load will not allow the performance to be properly measured. So for those tests disable any popup/javascripts if those add functions that require user interaction for the full page to load.

Purging cache is only require if you make changes on your landers. If no changes are added purging the cache will be pointless. Another important thing to mention here is to check your server settings and make sure that the web service does not send any headers to override the CDN cache TTLs. If you send such headers modify the web service and disable those portions in the config normally those will be in the vhost of each domain but it is possible the same to be added globally in the main web service config file. On apache check the .htaccess files as well if any.


Home > Technical & Creative Skills > Programming, Servers & Scripts