superstatic icon indicating copy to clipboard operation
superstatic copied to clipboard

Provide a simple way to serve one version of a site to PRPL-ready browsers and a different version to legacy UAs

Open slightlyoff opened this issue 8 years ago • 2 comments

The new H/2 push support is great! It, however, leaves a Polymer CLI app in a tough spot as it isn't obvious at first blush how to serve the bundled version to legacy UAs and the H/2 push version of the app to the PRPL-supporting browsers.

It'd be great if there was a way in the static site config to capture this difference and provide configuration for each type.

/cc @mbleigh @ebidel @justinfagnani @graynorton

slightlyoff avatar Jan 06 '17 23:01 slightlyoff

Another use-case for this we just ran into: serving a static/server-rendered version of a page to bots & crawlers that don't execute JS, and a dynamic one to those that do.

At first blush I believe one solution might be able to apply to both of these problems - a static mapping of UA strings (ideally regexes) to URL rewrites.

tjsavage avatar Jan 19 '17 02:01 tjsavage

This may be making the effort too broad, but if you are looking at static sites then you should also look at making the metadata different for each page. This is currently a problem for how Facebook shares pull the title, description, url and image for meta tags. So currently sharing SPA on Facebook and Twitter with meta data FAIL.

raydaly avatar Jan 25 '17 04:01 raydaly