duskosobic
1/25/2017 - 10:38 PM

Prevent CSS Caching. Adds stylesheet with time of last update. If the number changes the browser updates the CSS instead of using cached ver

Prevent CSS Caching. Adds stylesheet with time of last update. If the number changes the browser updates the CSS instead of using cached version. Easily amended to be none WP specific.

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . 'https://cdn.css-tricks.com/style.css'); ?>" type="text/css" media="screen" />