Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8735951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:11:26+00:00 2026-06-13T10:11:26+00:00

We’re using google maps and want to keep our traffic to that site to

  • 0

We’re using google maps and want to keep our traffic to that site to a minimum. At present we have an <li> element that contains an href to a generated maps.google.com URL. That link can change based on the orientation of the device– the same map address, but we use a resized map to fit the screen appropriately.

We’re storing the portrait and landscape google maps’ <href> values to keep from regenerating them every time the device is reoriented. Then, on every orientation change we flip the <li>‘s html property using jQuery like this:

//on an orientation change...
if (window.orientation == "portrait") {
   $(#mapLi).html(portraitMapHref);
}
else {
   $(#mapLi).html(landscapeMapHref);
}

The google API generates the hrefs and the embedded <img> tags for us on the page load, and the first time an orientation change occurs. This of course leads to a connection to maps.google.com.

When we swap back and forth using the .html function with the cached hrefs there doesn’t appear to be a simultaneous call to maps.google.com, which is what we’re after, but I wondered if this is due to browser caching or the nature of the .html function in jqm? I thought that swapping the html value in that element would trigger a call to the maps.google.com address. Should it not, or are we getting lucky with browser caching?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:11:28+00:00Added an answer on June 13, 2026 at 10:11 am

    It’s not clear what exactly you store in portraitMapHref and landscapeMapHref, but I guess you store nodes.

    In this case when you use $.html(), the new content will replace the current content, but the old content(node) will not be deleted, it’s still a node, no matter if it’s attached to the DOM or not.

    There is nothing to load when you re-use the replaced node.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.