• Resolved gbruzzo

    (@gbruzzo)


    Hello there

    – is there a way to exclude a whole page from Frontend Optimizations?

    – is there a way to run different Frontend Optimizations on a given page?
    Example : do not defer JS on Page X, but defer it everywhere else.

    We are encountering a conflict between SG Optimizer and PayPal for Woocommerce (specifically PayPal Express) by Angelleye on the Cart and Checkout pages.

    Whenever Defer JS is enabled, we observe the following error involving PayPal Smart Buttons in the browser console:

    Failed to load resource: the server responded with a status of 400 (Bad Request)

    https://www.sandbox.paypal.com/smart/buttons?style.label=pay&style.layout=vertical&style.color=blue&style.shape=rect&style.tagline=false&components.0=buttons&locale.lang=en&locale.country=US&sdkMeta=eyJ1cmwiOiJodHRwczovL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9c2IjMDM4O2N1cnJlbmN5PUdCUCZidXllci1jb3VudHJ5PUdCJmNvbW1pdD1mYWxzZSZpbnRlbnQ9Y2FwdHVyZSZsb2NhbGU9ZW5fVVMmc2l0ZWdyb3VuZC1hc3luYz0xIiwiYXR0cnMiOnsiZGF0YS11aWQiOiI5OTc0OTQ4MTlmX210eTZtanE2bnRpIn19&clientID=sb%23038%3Bcurrency&storageID=f8ae0619b2_mty6mji6mtq&sessionID=be81c60907_mty6mji6mtq&buttonSessionID=33260a3d61_mty6mjq6nti&env=sandbox&fundingEligibility=eyJwYXlwYWwiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sInBheWxhdGVyIjp7ImVsaWdpYmxlIjpmYWxzZSwicHJvZHVjdHMiOnsiZmxleCI6eyJlbGlnaWJsZSI6ZmFsc2V9LCJwYXlJbjQiOnsiZWxpZ2libGUiOmZhbHNlfX19LCJjYXJkIjp7ImVsaWdpYmxlIjp0cnVlLCJicmFuZGVkIjp0cnVlLCJpbnN0YWxsbWVudHMiOmZhbHNlLCJ2ZW5kb3JzIjp7InZpc2EiOnsiZWxpZ2libGUiOnRydWUsInZhdWx0YWJsZSI6dHJ1ZX0sIm1hc3RlcmNhc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Y2Fkb3BhZ28iOnsiZWxpZ2libGUiOmZhbHNlfX0%3D&platform=desktop&flow=purchase&currency=USD&intent=capture&buyerCountry=GB&supportsPopups=true

    We have reached out to the developer.

    Not Deferring JS resolves the issue, BUT: We would like to either not run any optimization on the cart page OR not defer JS but only on the cart page.

    Is this at all possible?

    Thank you in advance

    Giacomo Bruzzo

    • This topic was modified 4 years ago by gbruzzo.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @gbruzzo,

    I am afraid there is no way to exclude a whole page from all Front-end Optimizations.

    As for the second question, there is no way to run a specific optimization only for page X.

    As for the conflict with the other plugin you are using. Check what dependencies does the plugin requires and make sure that you have excluded them from the Deffer Render blocking JS. In other words, if the plugin requires another script that is loaded asynchronously can lead to errors since it is requiring a specific asset earlier than loaded.

    Kind Regards,
    Stoyan

    Kind regards,
    Stoyan

    Thread Starter gbruzzo

    (@gbruzzo)

    Hello @stoyangeorgiev, thanks for your answer.

    Have you (Siteground) considered the possibility of offering per page optimization (or per page exclusion from optimization)?

    Example : Cart and Checkout – for whatever reason, stores might like to not optimize (or only partially optimize) these (and other) pages.

    I genuinely think this would be a very welcome addition to the plugin’s arsenal.

    (Also

    – Please increase the dynamic/memcached caching time to hours/days (it seems like minutes now)
    – Please consider a cache warming method (for local cache – I understand it is impossible for edge/cloudflare cache).
    )

    thank you in advance

    Giacomo Bruzzo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude a page from Frontend Optimization’ is closed to new replies.