Caching by user agent
-
Hi
We’re using the Bridge theme which conditionnally enqueues styles for different User agents. So for instance, it might enqueue a stylesheet specifically for safari, like so:
if($is_safari) { wp_enqueue_style("safari", THEME_ROOT . "/css/safari_stylesheet.css"); }
Now when I enable SuperCache, it will cache the HTML and serve it to multiple requests. The issue is there if I visit the site on Safari, SuperCache will save the site including the Safari-specific stylesheet. If I visit the site on Chrome, the menus don’t behave as expected because there is CSS included that shouddn’t be there.
Is it possible to tell SuperCache to create a cached version per user agent?
So if I visit the site on Safari, SuperCache will retuyrn a cached version only if the cached version matches my user agent?Thanks
The page I need help with: [log in to see the link]
- The topic ‘Caching by user agent’ is closed to new replies.