• Resolved mjg2

    (@mjg2)


    First off, great job on this plugin, so far things appear to be working very well. I had a question for you on a particular use-case involving some plugins we use…

    We are using a couple plugins that include their css and/or js by naming the file using a timestamp to accomplish versioning. The exclude css and exclude js textboxes show examples of entering a specific filename only…

    Here’s an example of one script that I’d like to exclude but doesn’t have a “static” name:

    <script type=’text/javascript’ src=’//storage.googleapis.com/nelioabtesting/6209123576184832.js?ver=4.1.1′></script>

    Is it possible to exclude the above using a portion of the path (i.e. ‘nelioabtesting‘)?

    Thank you!

    https://wordpress.org/plugins/autoptimize/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frank Goossens

    (@futtta)

    yes, that is absolutely possible 🙂

    frank

    Thread Starter mjg2

    (@mjg2)

    Hi Frank,
    That’s great to hear. Can you point me to any docs or examples on how to accomplish excludes of this style?

    Plugin Author Frank Goossens

    (@futtta)

    There are examples in the FAQ, under “How does “exclude from optimizing” work?”. But more generally speaking, you can exclude based on any string really;

    e.g. for
    `//storage.googleapis.com/nelioabtesting/6209123576184832.js?ver=4.1.1′

    you could use storage.googleapis.com or googleapis.com or nelioabteting or 6209123576184832.js or storage.googleapis.com/nelioabtesting or nelioabtesting/6209123576184832.js or googleapis.com/nelioabtesting/6209123576184832.js or storage.googleapis.com/nelioabtesting/6209123576184832.js … it all depends on how specific you want to be.

    In your case I’d indeed just use ‘nelioabtesting’ or ‘googleapis.com/nelioabtesting’.

    hope this clarifies,
    frank

    Thread Starter mjg2

    (@mjg2)

    Absolutely! Thank you very much 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘exclude css or js by path’ is closed to new replies.