Title: Delay the plugin?
Last modified: February 28, 2018

---

# Delay the plugin?

 *  Resolved [vebbmaster](https://wordpress.org/support/users/vebbmaster/)
 * (@vebbmaster)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/)
 * Hello! The plugin is great and works very well, except for one thing… It seems
   to add at least 600 ms to the page load time and it does the IP lookup before
   loading the rest of the page.
 * Is there an easy way to delay the lookup, or wait until the page is completely
   loaded?

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

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10027396)
 * Which source are you using? If you’re using the Maxmind file-based (automatic),
   600ms seems too much. Web-based sources will have this (hostinfo/Maxmind Precision).
 * Defer the lookup to do it after the page load will be possible when the AJAX 
   functionality is ready. [https://wordpress.org/support/topic/js-api/](https://wordpress.org/support/topic/js-api/)
   But as you see there, I cannot say when I come to it …
 *  Thread Starter [vebbmaster](https://wordpress.org/support/users/vebbmaster/)
 * (@vebbmaster)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10032005)
 * That’s the one I’m using (file-based, automatic). AJAX functionality would be
   great, I’ll keep an eye out for updates from you. 🙂
 * I was trying to delay it myself using jQuery, and at one point an external file
   with the lookup in it, but it didn’t work like I wanted it to. I’m not very good.:
   p
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10032099)
 * There is a proof of concept in the AJAX thread of this – I didn’t try it but 
   I suspect it works …
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10032112)
 * But 600ms for a file-based lookup is still surprising to me (in my test it was
   < 10ms).
 * If you do the lookup in the backend (Lookup module), does he also indicate a 
   lookup time of 600ms? If not I wonder where this extra time is coming from. Or
   is it the initialization of the plugin, i.e. difference between activated or 
   not activated, even if there is no lookup in the code?
 *  Thread Starter [vebbmaster](https://wordpress.org/support/users/vebbmaster/)
 * (@vebbmaster)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10043664)
 * When I tested in the backend, it says “Lookup duration: 0.01046 s”.
 * This is what I have in the code: [geoip_detect2_get_client_ip] – [geoip_detect2
   property=’city’] [geoip_detect2 property=’country’]
 * If I remove those shortcodes, it goes down from ~610 ms wait to ~10 ms for the
   page. Not sure what specifically is causing it.
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10073310)
 * 10ms sounds like you are using a page cache? In this case yes it does make a 
   big difference if any GeoIP code is included or not – because the plugin automatically
   tells the caching system to not cache this page. So yes, your only option is 
   the AJAX way above.

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

The topic ‘Delay the plugin?’ is closed to new replies.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/delay-the-plugin/#post-10073310)
 * Status: resolved