Closed DmitriyKashin closed 8 years ago
Thanks for the report! :-)
If I understand correctly, this is not a bug, it's the intended functionality. The HTML Compressor doesn't add the expense of checking filemtime()
on every single file each time it loads a page. That would slow things down drastically. Instead, it looks at the URLs only.
So if you change a script, you should indicate that by either clearing the cache, or by updating the URL; e.g., providing a version in the URL itself.
<script src="http://sitename.ru/js/vendor/modernizr-2.6.2.min.js?v=2.02"></script>
Thank you for response :)
Hello! Just want to say that dynamically cache update not working right now. That's a big problem for highload services. My setup looks like:
$options=array(); $options['cache_dir_public']=ROOTPATH.'/html-https/htmlc/cache/public'; $options['cache_dir_url_public']= '//sitename.ru/html-https/htmlc/cache/public'; $options['cache_dir_private']= ROOTPATH.'/html-https/htmlc/cache/private'; $html_compressor = new WebSharks\HtmlCompressor\Core($options); ob_start(array($html_compressor, 'compress'));
Head tag for example:
So the problem is that i can remove whole content from modernizr, save it, reload the page and still get old cached modernizr. Thank you!