Hi!
I think you can implement an improvment. When you use the Autoptimize, this plugin don’t work (as intended). But you can do it better, like this:
add this function:
function fbacb_is_exludes_in_autopmize($src, $ao_excludes) {
$excludes = array_map('trim', explode(',', $ao_excludes));
foreach ($excludes as $exclude) {
if (strpos($src, $exclude) !== false) {
return true;
}
}
return false;
}
and change begening of code to this:
if (preg_match('/\.js($|\?)/i', $src) && $ao_conf->get('autoptimize_js') && !fbacb_is_exludes_in_autopmize ($src, $ao_conf->get('autoptimize_js_exclude'))) {
$skip = true;
}
if (preg_match('/\.css($|\?)/i', $src) && $ao_conf->get('autoptimize_css') && !fbacb_is_exludes_in_autopmize ($src, $ao_conf->get('autoptimize_css_exclude'))) {
$skip = true;
}
]]>
Hello,
Here are three questions, and really expect your professional support:
1. Does it support Multisite please?
2. We are running sever with nginx with Redis cache but not Apache, any suggestions upon configuration setting?
3. I am trying to use cache-busting function to solve tough problem: we want make the site running for both Pc browser and an App with the name of Wechat, but once we access a page in Wechat, it will show “please access”in Wechat on PC browsers since cache machanisim of Wechat. Hopefully we want to resolve the problem by using cache-busting, is this a right way please?
Thanks in advance!
]]>I have installed and activated the plugin and also added the required code into my htaccess file, however upon activating, all the CSS and JS files are 404.
The names of the files changed from
style.css
to something like
style.192484384553.css
Is this the expected behaviour? What is causing the problem here? Testing on a fresh install of WordPress with no other plugins activated.
]]>What title says. If WP_CONTENT_DIR
is outside ABSPATH
file_exists($file_path) (line 63) conditional fails as ABSPATH . $_src['path']
will never be the actual file location.
More error-proof approach would be to replace WP_CONTENT_URL
with WP_CONTENT_DIR
in original url to get an accurate file path.
I am pretty new to wordpress and plugins.. so bear with me. I am trying to clean up some of the caching weirdness we are seeing with our site and found this plugin which seems to take a good approach to clearing up most of the issue we have. I have gone through the install and adding of redirect rules.. Everything looks correct, but when I load page I get a bunch of 404s for filename not found; where filename is typically some foobar.21343434.css file… It looks like the mapping to the real files is not happening in apache or something. Any ideas?
]]>