launchinteractive
Forum Replies Created
-
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Disable when users logged inMaybe we could check for the existence of the motopress-ce-auto-open=true parameter?
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Disable when users logged inAhh, I see your point. Are you able to try the following code in merge-minify-refresh.php:
if(is_admin() || current_user_can( 'administrator' )) {on line 86
I wonder if there is a way to detect if motopress is in edit mode. If so we could just disable MMR in that case.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Disable when users logged inMMR is designed to only work on the frontend so it shouldn’t affect your backend plugins. What are the plugins that your having trouble with?
Forum: Plugins
In reply to: [Merge + Minify + Refresh] css problemSure. My email is on my website (which is in my profile)
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Load minified css and js in footerHey Sam,
1) If you want to defer javascript then something like this will work:
function defer_parsing_of_js ( $url ) { if ( FALSE === strpos( $url, '.js' ) ) return $url; if ( strpos( $url, 'jquery.js' ) ) return $url; return "$url' defer "; } add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );If you want to move your scripts to the footer in your child theme then you will need to dequeue the scripts: https://codex.ww.wp.xz.cn/Function_Reference/wp_dequeue_script
and then enqueue https://developer.ww.wp.xz.cn/reference/functions/wp_enqueue_script/ with the footer parameter as true. If you want to know the handles to use have a look at the logs that MMR generates.2) There isn’t something you can add to functions for this. MMR generates minified js and css files and then saves them to the file system. It is then left up to the web server to handle them correctly. You could possibly add a rewrite rule for everything in the mmr directory but if you can’t make modifications to your htaccess I don’t think this would work either.
I noticed your site isn’t combining CSS and JS. Is this intentional?
You also might benefit from installing an image optimiser like “ewww image optimizer”Forum: Plugins
In reply to: [Merge + Minify + Refresh] css problemHi. Are you able to provide a link to your website and tell me which icons on the page are the ones that are breaking?
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Mixing minified and non-minified filesGreat. Glad I can help.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Mixing minified and non-minified filesHi,
MMR will use a non-minified file if one is found in the same directory as the minified file. You can manually ignore files in the settings of MMR.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Load minified css and js in footerHi Sam,
You can put your scripts down the bottom fairly easily using the last parameter of wp_enqueue_script or add a defer attribute. (I’m not sure if pagespeed supports the defer attribute)
The problem is plugins don’t generally add their scripts to the footer so you have to dequeue and enqueue them yourself.Putting stylesheets later isn’t as easy as javascript. You need to enqueue them after the header has been output as stylesheets don’t have a footer parameter.
I generally see this recommendation as a great idea but in practice too difficult to worry about. Especially with a WordPress site. Your mileage may vary.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] works on one website but not the otherAhhh cool. No worries.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] HTTP2 Server Push with CDNHave you tried using the MMR constants for this? They should make this possible…
Version 1.6.9 added the ability to specify the cache directory. Set MMR_CACHE_DIR & MMR_CACHE_URL constants in wp-config.php. MMR_CACHE_DIR must be full server path and MMR_CACHE_URL must be absolute URL for this to work correctly.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] VS AutoptimizeHi Amir,
Yes, MMR and autoptimize are very similar. There is a few differences that I’ve discovered:
Autoptimize appears to turn on gzip automatically (MMR leaves this up to the developer)
Autoptimize can compress HTML
Autoptimize moves all js to footer unless specified (MMR leaves this up to the developer)
Autoptimize uses jsmin for javascript minification (MMR uses closure which from our testing creates smaller files)
Autoptimize uses md5 hash for the files (MMR uses adler32 which from our testing is faster)
Autoptimize compresses css using cssmin.php (MMR uses Minify which from our testing creates smaller with a barely noticeable difference)From our testing MMR executes slightly faster.. but the difference is so tiny I’m wondering if I should really mention it.
At the end of the day Autoptimize is very good and its up to you which one you want to go with.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Log FilesHi, The live site will use non minified files while the minified files are being generated. This prevents the website from breaking while the work is done in the background. If the minification process is successful you should see .min.css and .min.js – you may just need to refresh the page.
Does that make sense?
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Use with another caching plugin?I have seen it done before and it works. Just make sure you turn off concatenation and minification with Super Cache and you should be ok I think.
Forum: Plugins
In reply to: [Merge + Minify + Refresh] Exclude CSS and Javascript Per PageThanks for the donation. I’ve purchased Gonzales and patched MMR to support it. Please try out MMR 1.7.6 and let me know if you have any issues.