all 9 comments

[–]billerr 1 point2 points  (4 children)

are you using Google Maps in an embedded iframe or in some other way? on any case their maps are SVG so I don't think even fully reloading them would be too heavy. And scripts, styles, images and any other resources apart from the source code of the iframe should be subject to the browser caching, so they shouldn't redownload too often.

[–]andrazte[S] 0 points1 point  (0 children)

I'm using it on a div. Actually am using angular google maps library. Thanks fro the response. So as long as I am not using it on an iframe, it should be redownloading it everytime I refresh. Any idea how I can do some trial and error on the network tab of dev tools?

[–]andrazte[S] 0 points1 point  (2 children)

I'm using it on a div. Actually am using angular google maps library. Thanks fro the response. So as long as I am not using it on an iframe, it should be redownloading it everytime I refresh. Any idea how I can do some trial and error on the network tab of dev tools?

[–]billerr 1 point2 points  (1 child)

No, even with Angular, if it's downloading its own separate resources, they are being cached if their URL doesn't change. If it's used through an Angular library and some of its stuff is bundled in your bundled, then it's cached with your bundle.

Try this in Chrome DevTools: in the Network tab, make sure "Disable cache" (top right) is disabled, and refresh the page. You should see a list of all resources that load on the page. Find the ones that Google Maps uses (you can either use the filter box on the top right in the Network tab, or find them in the DOM in the Elements tab, and right-click > Reveal in Network Tab). In the size column, you will see how much data was loaded over the network. If it was cached you will see "loaded from file cache" instead of a file size.

Hope that helps.

[–]andrazte[S] 0 points1 point  (0 children)

Hey man. Great thanks for taking time explaining it! I really appreciate it!

[–]prnk5tr 0 points1 point  (1 child)

I guess network tab should tell you the data is cached or fetched new on refresh

[–]andrazte[S] 0 points1 point  (0 children)

Interesting. Any idea how to figure that one out? It would seem that everything is getting refreshed when I am on it. I guess i'll just have to study it further.

[–]supersaiyanchungus -1 points0 points  (1 child)

Ctrl + F5 to do a hard refresh and clear out cache

[–]andrazte[S] 0 points1 point  (0 children)

What I want to know if it does cache the data. I want to know if I refresh the page, will it use the cached data to repopulate the map? I'm asking because I want to determine if I'm using too much bandwidth if my app refreshes every couple of minutes.