AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Nodejs maxmind4/1/2024 ![]() The documentation is quite good – so getting started with that won't be a problem. If you're willing to spend a few bucks you could also look into MaxMinds Web Service, which is a simple REST API and will be the most precise way to go. In terms of performance you have to do some benchmakrs (if this topic matters to you) … There is no general answer to the question, which type of module (C-binding/native) will be faster. Both are okay and it's up to you which library you like more. Kuno/GeoIP is a GeoIP binding, so at it's core it's using the libGeoIP C library, which is okay, but maybe not as portable as the pure JavaScript implementation bluesmoon/node-geoip offers. (More information on MaxMinds free solution can be found here). So you may consider writing a little sync service / script, which updates the database once per month. AFAIK you have to keep these databases up-2-date manually, which is a clear downer. I took a look at the two most used geoip/-location modules available for node.js and they both use the datasets provided by MaxMind. ![]() So I suggest you to think about going with a hybrid approach, like trying to get the users location via the HTML5 geolocation API inside the browser and fallback to the serverside if necessary. Using IP-based geolocation is possible, but not very accurate. ![]()
0 Comments
Read More
Leave a Reply. |