• Resolved junx0r

    (@junx0r)


    Hello, I found an issue when using W3TC and Flying Scripts after all. The issue only happens if there is a parameter string in the url (like ?param=x). In that case, the script that is being delayed never fires upon interaction.

    The problem happens when the url is something like this:

    https://www.example.com/something/here/?utm_source=stuff

    but it works fine if it’s https://www.example.com/something/here/

    Any thoughts on this? I tried disabling options in the general settings one by one, but that did not help, the problem doesn’t seem to be coming from there.

    Do you have a sense of why this happens and how to fix it? Much appreciated. Thanks.

    • This topic was modified 2 years, 9 months ago by junx0r.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @junx0r

    Thank you for reaching out.
    Just to confirm, it does not matter if every setting in W3 Total Cache General Settings is disabled, the problem is still there?
    Can you confirm that the issue persists once the W3TC is disabled?
    Thanks!

    Thread Starter junx0r

    (@junx0r)

    Yes, the issue persists if I disable the individual settings. But if I deactivate the W3TC plugin, the problem goes away, and Flying Scripts works fine.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @junx0r

    Thank you for the information.
    It’s difficult to troubleshoot this since the problem is not specific to any setting.
    What I can recommend is to completely remove and re-install W3 Total Cache as there may be some redundant files in the cache folder, or you can manually delete the cache folder in wp-content while all the settings are disabled in W3 Total Cache, and remove all drop-ins:
    – object-cache.php (if exists)
    – advanced-cache.php (if exists)
    – db.php (if exists)
    – upgrade folder
    Also, delete the w3tc-config and all W3TC rules from the .htaccess file.
    The only thing that comes to mind is the Browser cache setting “Remove query strings from static resources” which removes any query string.

    Let me know if this helps and let me know if you contacted the support of the Flying Scripts plugin?

    Thanks!

    Thread Starter junx0r

    (@junx0r)

    Thank you for your response and after some testing here’s what I have found:

    Under Browser Cache, turning “remove query strings” on or off makes no difference.

    Under Page Cache, if “cache pages with query strings” is turned on, it finally works. But I feel that’s maybe an inelegant solution to cache the same page with various query strings separately as if it’s different pages. Do you agree?

    The majority of my traffic has a query string, like ?utm_source=something

    I didn’t have the option turned on before, does that mean the pages weren’t being served from cache?

    Now that we’ve identified the problem a little bit better, is there a better solution you can suggest? Can the query string be ignored?

    Thank you again for taking the time to respond.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @junx0r

    Thank you for yoru feedback.
    The query URL with the query strings is not cached by default. Once the option Cache URIs with query string variables the pages with query strings are cached.
    The accepted query strings field is used to remove that part from the query string and then check if the URL equals a page that is cached and the utm_source is added to the filed
    So it doesn’t allow you to create a new version of the page to be cached, it actually just says the pages are equal, so you should load the cached page.
    So if this works for you, you should keep it enabled.

    Thanks!

    Thread Starter junx0r

    (@junx0r)

    Thanks so much for all your help. By the way I left a 5-star review for the plugin, well deserved.

    I’d like to make a few suggestions, if you’d care to read some feedback and ideas that you can consider for future development:

    – add preload attribute to the Featured Image (I currently use a separate plugin for this)
    – delay specific CSS files. There is a separate plugin or this, but it ties into performance and would be a great addition to W3TC
    – delay specific javascript files. Obviously Flying Scripts does this, but it would be nice to see it integrated in W3TC

    Thank you.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @junx0r

    Thank you for the review and your suggestions.
    I’ll make sure to bring this to the team for a review!
    Thank you again!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Small problem with W3TC and Flying Scripts’ is closed to new replies.