Reputation: 37
Im trying to cache Google Maps Api, to reduce requests. In their optimize recommendations they write about web-server proxying. I made it with nginx. Cached everything in the world, but not these requests to Google Maps Api!
I saved locally script of Google Maps, it cached, but it sends requests from its inside.
I see in development console, for example, tiles of map loaded from "memory cache", but requests still counting in google dashboard.
I heard, its not possible, but they wrote about caching in their official docs.
Where I can read about this? What I can do?
Upvotes: 1
Views: 9650
Reputation:
You can't.
The only part of the Google Maps API you can cache is certain geocoding results (and even then, only certain results, and only for a limited time). There is no way to cache the interactive maps on your server.
Do not attempt to cache any Javascript or other content used to display Google Maps in the browser. The contents of those scripts may change without notice, and many of your visitors will have those scripts in their browser cache already (e.g, from visiting other web sites which use Google Maps).
Upvotes: 6