mkbrv
mkbrv

Reputation: 407

Using CDN to cache parts of a webpage

Considering i have some static modules (parts) of a webpage. Is there a way of caching them in the CDN, only those and not the dynamic parts?

Loading those static parts using javascript (sending an ajax request to a specific URL which can be cached in the CDN) would be a solution, but then search engine crawlers will not be able to read them, and neither will users with no javascript enabled.

Have you ever encountered this, and if yes, how would you solve caching of static modules on a page?

Upvotes: 1

Views: 764

Answers (2)

Igal Zeifman
Igal Zeifman

Reputation: 1146

Sure, Assuming I got the question right, you can use Cache Headers to created object specific rules (http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/)

I actually work for a security CDN company and we have behavior learning algorithms that will do the job for you. There are other solutions as well, most commonly you will have a GUI in which you can dictate caching behavior.

Still, the headers are the most standard (if somewhat low-tech) solution.

Upvotes: 2

mkbrv
mkbrv

Reputation: 407

I would think of a solution by reading on the server the request headers and check if it contains elements from crawlers (example : https://support.google.com/webmasters/answer/1061943?hl=en ) and render differently the content. All in all i can tell an user: Hey access my site only with javascript enabled, but i really can't tell it to a crawler.

Upvotes: 0

Related Questions