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

  • SEARCH
  • Home
  • 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 8267459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:32:13+00:00 2026-06-08T05:32:13+00:00

By default, if you use ajax navigation of jQuery Mobile for loading a multi-page

  • 0

By default, if you use ajax navigation of jQuery Mobile for loading a multi-page template html file, it doesn’t work and just first page loads.

One method is using rel="external", but it doesn’t look well in a mobile phone or a tablet… (It should have animation!)

Isn’t there any better way? How to completely load a multi-page template html with jQuery Mobile ajax navigation?

  • 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-08T05:32:14+00:00Added an answer on June 8, 2026 at 5:32 am

    You can programmatically load pages into the DOM by using

    pageContainerElement.page({ domCache: true });
    

    The drawback of DOM caching is that the DOM can get very large, resulting in slowdowns and memory issues on some devices. If you enable DOM caching, take care to manage the DOM yourself and test thoroughly on a range of devices.

    Here’s the link: http://jquerymobile.com/test/docs/pages/page-cache.html

    UPDATE 1

    You would put that code in a separate file, i.e. custom-code.js and put it in your header after you load jQuery but BEFORE you load jQuery Mobile.

    So if your page container looks like this:

    <div data-role="page" data-theme="a" data-dom-cache="false" class="page blog-post">
    

    You would put div.page({ domCache: true }); and then in the head of all of the pages where you pull in jQuery and jQuery mobile, it would look like this:

    // Pull in jQuery
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    // Pull in your custom jQuery Mobile rules/scripts
    <script src="../path/to-file/custom-code.js"></script>
    // Pull in jQuery Mobile
    <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
    

    UPDATE 2

    The code above will cache that particular page. If you want to load ALL pages into the DOM, inside of the custom-code.js file, place this code and specify separately (one instance for each page) each page that you want to load into the DOM:

    $.mobile.loadPage( pageUrl, { showLoadMsg: false } );
    

    Prefetching pages naturally creates additional HTTP requests and uses
    bandwidth, so it’s wise to use this feature only in situations where
    it’s highly likely that the prefetched page will be visited.

    Also, if you want to pre-fetch all of the pages linked to on the current page, just add data-prefetch to the link.

    For example:

    <a href="page_2.html" data-prefetch>Link to other page</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a asp:FileUpload control in my page. The default file size is 4MB.
Is it possible to use jQuery.ajax() in node.js exactly as it is syntax-wise? I
I have an ASP .NET page where I use jQuery. I used this function
In my Rails app, I'm trying to use jQuery ajax to create a new
I found a nice example on how to use AJAX in jQuery at this
I am trying to use AJAX polling with jQuery to update a span element
I have written some code using jQuery to use Ajax to get data from
I am trying to use an ajax 'POST' call through the jquery $.ajax function
I'm trying to use django-ajax-uploader in my website, which works just fine in LAN,
Is it better to set session cache limiter to nocache or use jQuery ajax

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.