WordPress.org

Ready to get started?Download WordPress

Forums

MnCombine
[resolved] Excluding a specific page from using combined file (8 posts)

  1. healthproductsusa
    Member
    Posted 1 year ago #

    Hi,

    First off, thanks for this great plugin. I tried every js file combining plugin out there and every one of them broke the site. Even doing it manually did not work for me. Having said that, there is one page (my Woocommerce checkout page) that the combined js file adversely effects. Page performance of the checkout page does not have the same priority as the rest of the site, so is there a way of excluding this one page from calling the combined js file? Again, I really appreciate the fine work you have done and will also appreciate any suggestions pertaining to this question. If there is a way of donating, please let me know.

    Marty

    http://wordpress.org/extend/plugins/mncombine/

  2. mneil
    Member
    Plugin Author

    Posted 1 year ago #

    I had originally planned to allow for exclusion on certain pages but for the sake of just getting this thing going I decided against it. However, I still think it's a great idea.

    I already had a small bug fix to push and I went ahead and added a simple regex filter based on REQUEST_URI to the plugin general settings. So in your case, you could update the plugin and set the "Don't combine js on regex" to /\checkout$/ or whatever regex it is that matches your particular case. Eventually I will grab the pages from the database and just let you select which ones on a per file basis which is what I'd originally planned for scenarios like this.

    Anyway, I hope that helps you and others.

    There is a donate link on the plugin page or you can visit it directly http://mneilsworld.com/donate. Any amount is appreciated! Thank you!

  3. healthproductsusa
    Member
    Posted 1 year ago #

    Wow, I was just hoping for some direction, not an overnight fix. That is exactly what the doctor ordered, thanks. However, no matter what I enter for URI string (including a direct copy and paste from your above example), nothing is excluding the page. Some strings threw an error - most did not - but none worked. Regardless, I put through a donation.

  4. mneil
    Member
    Plugin Author

    Posted 1 year ago #

    What is the URI of the page you're trying to exclude?

  5. healthproductsusa
    Member
    Posted 1 year ago #

    https://mysite.com/checkout/

    Could the SSL be the issue?

  6. mneil
    Member
    Plugin Author

    Posted 1 year ago #

    Is that domain pointed locally because mysite.com is a host and /checkout/ doesn't exist. Can you try /\/checkout/ as the regex to exclude the page and let me know if that works? SSL should not be an issue.

  7. healthproductsusa
    Member
    Posted 1 year ago #

    I wasn't using the full URL. In any event, that string did the trick. Taking out the $ was the answer - and the only variation I didn't try. Thanks so much for the help. Again, great plugin. It will be a huge benefit to anyone concerned about improving page performance without sacrificing functionality.

  8. mneil
    Member
    Plugin Author

    Posted 1 year ago #

    The $ in a regular expression signifies the end of a string. Please note that /\/checkout/ will exclude ANY uri that contains the string /checkout.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic