Jump to content

Archived

This topic is now archived and is closed to further replies.

lexlex88

Browser Specific CSS and Cache

Recommended Posts

lexlex88    0
lexlex88

I'm using w3 total cache and the browser specific css tools. However, I've discovered which ever browser opens a page first sets that browser body tag in the cache for that page.

 

Example:

 

I open pageA in firefox after reseting the cache.  Then I open pageA in safari hoping the browser specific css I set for safari will apply, but it does not because the body tag is cached as firefox.

 

Thanks for any help.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

Can you provide a link to your site please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Simon    247
Simon

You cant cache a page and expect it to change depending on the users browser. Unless you correctly configure the cache to ignore mobile devices or use a pure javascript detection plugin.

Share this post


Link to post
Share on other sites

  • Similar Content

    • jeomiland
      By jeomiland+
      In DMS2 there was a button to click to flush pagelines cache. Don't see this in platform5. Am having a big problem with caches. Have W3 Total cache plugin, but now even if I deactivate it, the code in css/less seems to not be registering??? I can delete all custom css, save, then add just a bit of the css (that used to work just fine the other day) and that small section of css takes effect. Then when I paste the whole css (that worked fine the other day), it seems to not work???
      About to restore DB backup from a couple days ago to see if that solves it, but it's a drag that this issue exists. Makes it hard to finetune the site.
      Thanks for help
      site is: http://permacultureecovillage.com/lev2017/
      lev styles most recent.css.rtf
    • richardjacruz
      By richardjacruz+
      I noticed that the cached version of the website from a Google SERP has broken CSS:
      http://webcache.googleusercontent.com/search?q=cache%3A1uyPM2gXGG0J%3Astevensoncrane.com%2F+&cd=16&hl=en&ct=clnk&gl=us
      Any idea why? The site looks fine elsewhere.
      Also, when using the Web Developer Toolbar in Mozilla Firefox, there are a BUNCH of warnings regarding CSS. I'm wondering that's the problem with the Google cache.
      In a prior post, I had experienced similar "breaking" of the CSS, but that was due to some errors in DNS. I thought we resolved all of that, so this perplexes me.
      Thanks,
      Rich
    • jefim
      By jefim
      It would be nice to know what is the official stance on caching plugins like Total / Super cache? Because even though the documentation clearly states that it is possible to use those plugins (http://docs.pagelines.com/advanced/optimize-load-time) there are numerous threads on this forum that indicate that Pagelines is not very compatible with those. And it gets even better - any time someone has a problem somehow related to a caching the advice from Pagelines is "flush cache and disable the 3rd party caching plugin", which is clearly not a solution of the problem in any way since caching is essential for WP sites (as WP is a very heavy website). So, the questions are:
      1. Do you officially support Total Cache / Super Cache or any other cache plugins?
      2. If you do - then does the user need to flush cache manually every time he makes a change to a page via pagelines? Changes to content are, of course, automatically picked up by caching plugins, but changes by Pagelines are not necesserily "visible" to those plugins.
      Thanks in advance for your answers.
    • camaran
      By camaran
      Hi,
       
      DMS Pro Plugin have a library for section cache, it's very experimental but it's very good for use with memcached server.
      <?php class Cache { public function __construct() { define( 'ENABLE_SECTION_CACHE_I_KNOW_THE_RISKS', true ); add_filter( 'pl_section_cache_nocache', array( $this, 'noCache') ); } public function noCache() { $noCache = array( 'postloop', 'postnav', 'pagination', 'pl-powerloop', 'flipper', 'comments', 'masonic', ); return $noCache; } } new Cache; You must insert in a plugin for active it
       
      Now you can TEST TEST TEST
    • JudithKlinger
      By JudithKlinger+
      I ran Google Developer's Page Speed Insights, and it's recommending that I should leverage browser caching on specific files. 
      Here's the text: Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
       
      I've never done this & before messing around with the .htaccess file (gulp!)... is there anything I should be aware of with DMS and expiry dates? Is there a plugin that would make this easier? CloudFlare? 
       
      I had been working in NoCache mode as we did some big additions, and was hoping that once I went back to cache mode it would miraculously clear up...but I'm not that lucky. 
       
      Grazie!
      Judith
      http:://world-eats.org
×