Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hopefully someone can help. I'm using OpenLayers and have a TMS layer with local tiles stored. When drawing the tiles it seems slow, I see the tiles load one by one.

Is there a way to make getURL request multiple tiles at once?


share|improve this question
up vote 3 down vote accepted

You are running into the limit of multiple connections to one server.

According to standards the HTTP 1.1 RFC limits persistent connections to 2 per server. This means that at one time a browser should parallel download/receive only two files from the same server.

This limit was set in the early days of the internet, and thankfully most browsers ignore this limit and request for more resources simultaneously.

So you should see 6 to 8 requests simultaneously, if you use a modern browser like Mozilla Firefox or Google Chrome.

To increase the speed even further, you need to serve the tiles from several hostnames. By configuring additional hostnames, the browser will load more tiles simultaneously, resulting in a faster load time.

To set this up:

  • Set up multiple DNS aliases for the same content. It may make sense to simply set up a wildcard DNS name for tile loading, a la *

  • Change the OpenLayers.Layer creation to use multiple URLs:

Layer.TMS("Name", ['', ''], {'layername':'mapnik'})

You should also have a look at this sample: Multiple Server URLS

share|improve this answer
Perfect thanks. – Strikeforce Mar 19 '13 at 10:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.