What probably is happening is that you have a page cache, but if you visit your site for the first time in a day there is no valid cached version of that page, triggering autoptimize. if the CSS or JS for that page is different from the one of the day before (mostly due to inline JS or CSS), then AO will have to re-minify those for that first request. so the “few seconds” is a combination of time spent in WordPress (getting and rendering content) and time spent in Autoptimize (optimizing).
So for the AO-part have a look at the troubleshooting tips and the part about cache size (which is a likely side-effect of what you’re seeing) in the FAQ @gorem.
hope this helps,
frank
Thread Starter
gore.m
(@gorem)
Thanks you, so Ill try to play with “inline” settings.
Is there anything more I can do on server side?
Is it possible to clean up CSS and JS from comments etc. by AO?
Is there anything more I can do on server side?
let pages remain valid for a longer time in your page cache? 🙂
Is it possible to clean up CSS and JS from comments etc. by AO?
don’t understand I’m afraid ..
Thread Starter
gore.m
(@gorem)
Is it possible to clean up CSS and JS from comments etc. by AO?
I mean If AO is able to remove comments from CSS an JS when it is minifying them.
it does automatically, except for “important comments”, e.g.
/*!
* Bootstrap v4.0.0 (https://getbootstrap.com)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
Thread Starter
gore.m
(@gorem)
Yes, Im sorry you are right, it was my mess in CSS.
Thanks you
you’re welcome @gorem, feel free to leave a raving review here! 😉