views:

48

answers:

0

Hi there,

I have a little issue with my site. I have a page that hosts a google map. However the map does not get shown until the user clicks a button. It then call $.getJSON to get the addresses that i need to show on the map...

$.getJSON(theurl, function(json) {
  ...
}

It all works fine. However if the user then moves to a different page and then clicks the Back button they get the data from the $.getJSON call displayed, not the page itself.

It's as if the call to get the addresses has become part of the browsing history. If the user hits refresh when the data appears the full page then gets displayed.

Can anyone tell me how to stop this from happening.

I'm using the googlemap in an ASP.Net MVC site.

Thanks