• Resolved kornixpl

    (@kornixpl)


    Hello, I have a problem with autoptimize, cache growns too fast, but if i turn off aggregate inline CSS and JS site grid and styling get lost. What did I need to do?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, let’s start with just turning of “aggregate inline JS” maybe? ??

    Thread Starter kornixpl

    (@kornixpl)

    Nope, but if I turn off aggregate inline css with on “aggregate inline js” it works, but only with checked next option – I don’t know how it names in eng:
    https://i.imgur.com/Jn1niq7.png

    Something like: Let Autoptimize extract JS from HTML (…).

    But this will be cause for fast growning cache… What can I do next?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so what happens if the only change you make is unchecking that 3rd JS optimization option (extract JS from HTML)?

    Thread Starter kornixpl

    (@kornixpl)

    It change from this to this

    • This reply was modified 6 years, 3 months ago by kornixpl.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    And when “extract JS from HTML” is unchecked, what JS error(s) do you see on the browser console?

    Thread Starter kornixpl

    (@kornixpl)

    Yup, jQuery is not defined

    <script type="text/javascript">jQuery(document).ready(function(){
    					jQuery(".ult_modal-body iframe").each(function(index, element) {
    						var w = jQuery(this).attr("width");
    						var h = jQuery(this).attr("height");
    						var st = '<style type="text/css" id="modal-css">';
    							st += "#"+jQuery(this).closest(".ult-overlay").attr("id")+" iframe{width:"+w+"px !important;height:"+h+"px !important;}";
    							st += ".fluid-width-video-wrapper{padding: 0 !important;}";
    							st += "</style>";
    						jQuery("head").append(st);
    					});
    				});</script>

    and there:

    <script type="text/javascript">
    			(function($) {
    				$('head').append('<style type="text/css">#layout.dfd-blog-loop .dfd-blog {margin: -10px;}#layout.dfd-blog-loop .dfd-blog .post .cover {padding: 10px;}#layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-masonry.dfd-smart-grid .post .dfd-blog-heading-wrap, #layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-fitRows.dfd-smart-grid .post .dfd-blog-heading-wrap {top: 10px;}#layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-masonry.dfd-smart-grid .post .entry-content, #layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-fitRows.dfd-smart-grid .post .entry-content {bottom: 10px;}#layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-masonry.dfd-smart-grid .post .dfd-blog-heading-wrap, #layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-fitRows.dfd-smart-grid .post .dfd-blog-heading-wrap, #layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-masonry.dfd-smart-grid .post .entry-content, #layout.dfd-blog-loop .dfd-blog-wrap .dfd-blog-fitRows.dfd-smart-grid .post .entry-content {left: 10px; right: 10px;}</style>');
    			})(jQuery);
    		</script>
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    in that case try adding js/jquery/jquery.js (assuming you’re using the stock WordPress jQuery) to the comma-separated JS optimization exclusion list?

    Thread Starter kornixpl

    (@kornixpl)

    It’s already there, and still jQuery not defined

    • This reply was modified 6 years, 3 months ago by kornixpl.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    so then you’re not using stock wordpress jquery? maybe check the page source of an un-optimized page to see how jquery is loaded normally? and make sure it is not asynced or deferred ??

    Thread Starter kornixpl

    (@kornixpl)

    Okay I get it. It was problem with transfer jQuery to footer, now works well, thanks for help! ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    happy it works kornixpl, feel free to leave a review of the plugin and support here! ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Autoptimize css fix’ is closed to new replies.