amazon cloudfront - Is it possible to add logic to CDN -


is possible serve 2 different pages based on user agent. want serve pagename-iphone.html if user agent matches iphone , pagename-other.html other user agents. want pages on site follow pattern. possible @ cdn level (cloud front, akamai etc).

thanks help!

i think after user agent based caching, vary: user-agent. in theory, server provide cache service can so, however, far can tell cloudfront , of other major cdn providers don' support so.

the basic reason straightforward there many user-agent header, , it's unique on every single browser, not mention different versions of same browser. if purely things based on whole user-agent, lost benefit of cdn cache of time.

some of more advanced servers allow add condition based on headers, example, in varnish, can add if,else logic returning different values. not available majority of cdns.

in other hand, should not rely on cdn return different html pages. cdn more commonly used accelerate artifacts (js/css/imgs) instead of whole page.

edit: actually, recieved email aws mentioned cloudfront starts support this:

mobile device detection: can cache , deliver customized content viewers on different devices (e.g. mobile vs. desktop) based on value of user agent header.

please refers to: http://aws.amazon.com/about-aws/whats-new/2014/06/26/amazon-cloudfront-device-detection-geo-targeting-host-header-cors/ more details.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -