• We’re using this plugin in conjunction with Offline Content for our website. Both seem to be having issues working with Autoptimize. Specifically, in the case of Offline Shell – AO aggregates the CSS and JS and loads then in the footer (from a CDn), it also loads Critical CSS in the header. These are done dynamically, and are not in the CSS, JS selector in the Offline Shell Settings.
    Is there a work around?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Guys;

    I’m autoptimize’s developer. I guess you’re using the WordPress CSS & JS queueing system to list files that can be used offline?

    Autoptimize kicks in (long) after the queues have been used, extracting CSS/ JS from the HTML and injecting the autoptimized files with filenames that contain hashes “on the fly”, so the queue-approach would indeed not work here.

    AO however has an API that can be used to dynamically get the URL’s of files that are injected in a page, maybe that can be used tot add AO-support? I’ll be happy to assist here if this would be something you would be interested in ??

    kind regards,
    frank

    Thread Starter pradeeprajadasvgp

    (@pradeeprajadasvgp)

    I have three questions on this:
    1 – Aren’t the AO URLs dynamic? We’d essentially need to modify the Listing Page of the Offline Shell Plugin, to include the AO CSS, JS in the assets list, which can then be “checked” to create the Offline Shell.
    2 – How do we handle the Critical CSS bit?
    3 – How will this work in the case of CDN being used for AO?

    well, the offline shell devs would probably add a generic option “include AO CSS & JS” and based on that being active they’d use the API to get the URL’s for those files and add them to the to be offlined resources.

    critical CSS is inline in HTML, so if the HTML is cached the critical CSS is included

    CDN: no idea if “offline shell” also includes non-local resources, guess the devs should answer that.

    frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Compatibility with Autoptimize’ is closed to new replies.