Support » Plugin: Geolocation IP Detection » Is There Any Way to Improve TTFB?

  • Resolved lukek


    Hi Benjamin (or anyone else),

    Is there any way to improve web page time to first byte (TTFB) when using this awesome geolocation plugin/feature?

    We are using it to detect geolocation and show a national vs international phone number in our header on every page (via Cloudflare geolacation data).

    When using GTMetrix and page loading speed tools it routinely comes back with a slow (up to almost 2 second) TTFB, which needless to say is seriously not cool.

    When I duplicate the page and remove this geolocation phone number element, the page loads a lot faster, and does not alert that there is a slow TTFB.

    I look forward to any tips or recommendations on this one, so that we can maximise our page loading speed accordingly.

    Kind regards,


    PS. GTMetrix performance report available at, for your reference.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter lukek


    Forgot to mention, I spoke with our web hosting support (FlyWheel Hosting) who alerted us that our web pages are not being cached at all.

    Their response included below for your reference, along with a dot point summary.

    – FlyWheel only provide static caching (so all pages with this on are not cached)
    – I am not familiar with JavaScript to set something alternative up
    – I have seen that CloudFlare offer dynamic caching, with their “Automatic Platform Optimization (APO)”, at If you think this would be a way to help improve the TTFB?




    “For the dynamic caching, our caching layer is all or nothing, we do not provide dynamically cached content outside of PHP-based functions which can be stored in OpCache, with the rest of our caching layer working as a full-page, static-cache. If the site does leverage any dynamic content, we generally suggest handling that information via Javascript, which can dynamically swap information after server-cache runs, allowing for minimal impact on server performance, but still allowing for dynamic content to be served (such as phone number swapping, if don’t at the ‘front end’ level instead of the ‘back end’ level).”

    • This reply was modified 7 months ago by lukek.
    Plugin Author Benjamin Pick


    AJAX mode should work for you, as 4.0-beta now has support for the shortcodes in AJAX mode as well. Then you can use the static page cache and the shortcodes are evaluated in JS.

    Thread Starter lukek


    That’s great, thanks @benjamin4

    Plugin Author Benjamin Pick


    4.0 is released now.



    Awesome, thanks @benjamin4

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.