"same content" for images?

112 views
Skip to first unread message

Andy Newby

unread,
Jun 22, 2011, 5:47:29 AM6/22/11
to google-map...@googlegroups.com
Hi,

I'm trying to speed up my  pages, and for some reason I keep getting this coming up:

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 49.2KiB.

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 47.6KiB.

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 46.7KiB.

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 44.5KiB.

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 43.0KiB.

The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL to save 1 request(s) and 41.3KiB.


Seems a bit silly to keep re-downloading the same images? (I checked them, and they are indeed identical) ... is there any way to stop this?

TIA!

Andy

Pil

unread,
Jun 22, 2011, 6:05:17 AM6/22/11
to Google Maps JavaScript API v3


On Jun 22, 11:47 am, Andy Newby <andy.ne...@gmail.com> wrote:
> ... is there any way to stop this?

If Google would stop this your maps would be loading slower.

The browsers do fetch only a few images simultaneously from one URL.
To bypass these browser restrictions the map tiles are loaded from
different URLs.

It's a good trick imho.

Andrew Leach

unread,
Jun 22, 2011, 6:14:56 AM6/22/11
to google-map...@googlegroups.com
On 22 June 2011 11:05, Pil <wol...@gmail.com> wrote:
>
> The browsers do fetch only a few images simultaneously from one URL.
> To bypass these browser restrictions the map tiles are loaded from
> different URLs.

Browsers open a limited number of connections to a particular server,
eg mt0.google.com, mt1.google.com, and so on. This is why tiles are
fetched in a "checkerboard" pattern.

However, the images which Andy referred to differ only in a parameter
in the url -- they are fetched from the same server. There seems no
good reason to do that when it will frustrate the browser cache.

Andy Newby

unread,
Jun 22, 2011, 6:22:07 AM6/22/11
to google-map...@googlegroups.com
Hi,

Yeah, I'm aware of using different URL's to help speed the pages up (I do that myself on sites)... but as you say, the image is IDENTICAL, and the URL just differs with stuff like this in it:

http://mt0.googleapis.com/vt?lyrs=m@156&src=apiv3&hl=en-GB&x=66&y=43&z=7&apistyle=s.t%3A33|s.e%3Al|p.v%3Aoff&s=G
http://mt0.googleapis.com/vt?lyrs=m@156&src=apiv3&hl=en-GB&x=66&y=43&z=7&s=G

The first one has an extra "apistyle=s.t%3A33|s.e%3Al|p.v%3Aoff" in it, which doesn't seem to make a difference?

I was just more concerned I was doing something silly like invoking it 2 times or something, but by the sounds of it this is common prachive for v3?

TIA

Andy


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.




--
Andy Newby
an...@ultranerds.com

Enoch Lau

unread,
Jun 22, 2011, 6:23:17 PM6/22/11
to google-map...@googlegroups.com, andy....@gmail.com
Hi Andy

Thanks for reporting this - we'll be taking a look at this internally.

Might I confirm with you which version of the API are you using? (3.3, 3.4 or 3.5?)

Enoch

Andy Newby

unread,
Jun 23, 2011, 4:10:40 AM6/23/11
to google-map...@googlegroups.com
Hi,

Thanks, that would be great. I'm not actually sure what version I'm using? I just have:

<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>

...and no v=xxx

TIA

Andy

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.

To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.



--
Andy Newby
an...@ultranerds.com

geoco...@gmail.com

unread,
Jun 23, 2011, 8:40:17 AM6/23/11
to Google Maps JavaScript API v3
On Jun 23, 1:10 am, Andy Newby <andy.ne...@gmail.com> wrote:
> Hi,
>
> Thanks, that would be great. I'm not actually sure what version I'm using? I
> just have:
>
> <script src="http://maps.google.com/maps/api/js?sensor=false"
> type="text/javascript"></script>
>
> ...and no v=xxx

FYI - that is the "nightly" (development) version:
http://code.google.com/apis/maps/documentation/javascript/basics.html#VersionDocs

-- Larry

>
> TIA
>
> Andy
>
>
>
>
>
>
>
>
>
> On Wed, Jun 22, 2011 at 11:23 PM, Enoch Lau <enoch...@google.com> wrote:
> > Hi Andy
>
> > Thanks for reporting this - we'll be taking a look at this internally.
>
> > Might I confirm with you which version<http://code.google.com/apis/maps/documentation/javascript/basics.html...>of the API are you using? (3.3, 3.4 or 3.5?)
>
> > Enoch
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-maps-js-api-v3/-/kYOKk7gMYCsJ.
>
> > To post to this group, send email to
> > google-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> --
> Andy Newby
> a...@ultranerds.com

Andy Newby

unread,
Jun 23, 2011, 9:25:46 AM6/23/11
to google-map...@googlegroups.com
Ah ok, so in fact I should actually be accessing it via v=3.5 (or whatever version I wanna use) ?

TIA

Andy
an...@ultranerds.com

geoco...@gmail.com

unread,
Jun 23, 2011, 9:58:03 AM6/23/11
to Google Maps JavaScript API v3
On Jun 23, 6:25 am, Andy Newby <andy.ne...@gmail.com> wrote:
> Ah ok, so in fact I should actually be accessing it via v=3.5 (or whatever
> version I wanna use) ?

Production pages should never use the "nightly" (development) version,
it can break unexpectedly.

Not also that the "Frozen" version will be retired the next time a new
current version comes out, so you probably don't want to be using that
either.

-- Larry

>
> TIA
>
> Andy
>
> On Thu, Jun 23, 2011 at 1:40 PM, geocode...@gmail.com
> <geocode...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > On Jun 23, 1:10 am, Andy Newby <andy.ne...@gmail.com> wrote:
> > > Hi,
>
> > > Thanks, that would be great. I'm not actually sure what version I'm
> > using? I
> > > just have:
>
> > > <script src="http://maps.google.com/maps/api/js?sensor=false"
> > > type="text/javascript"></script>
>
> > > ...and no v=xxx
>
> > FYI - that is the "nightly" (development) version:
>
> >http://code.google.com/apis/maps/documentation/javascript/basics.html...
> a...@ultranerds.com

Andy Newby

unread,
Jun 23, 2011, 10:55:34 AM6/23/11
to google-map...@googlegroups.com
Aah ok, I wasn't aware of that. Thanks for the heads up. I'll get that changed over ASAP :)

Cheers

Andy
an...@ultranerds.com
Reply all
Reply to author
Forward
0 new messages