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 7172383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:36:16+00:00 2026-05-28T15:36:16+00:00

I am having a problem with an application I am writing in jquery mobile

  • 0

I am having a problem with an application I am writing in jquery mobile and phonegap. While testing in the browser, I had no problems using the back button (no phonegap js involved). However once I try on a device with the phonegap js it breaks.

Steps to reproduce:

  1. Load app
  2. Visit several pages (linked internally using #)
  3. Click the back button or call history.back() from anywhere (using the js console, or by triggering something that calls it)

On the browser (chromium, firefox etc), it goes back one ‘page’ (to the previous # link whatever it was). This is the preferred behaviour.

On the device (iPhone 4, iPhone simulator, Android 2.2 (device), Android 3.2 (device)), it goes to the first/landing page (the first ‘page’ in the index.html file).

I suspect that the problem is with phonegap. Is there a way to revert to the preferred behaviour or the browser?

  • 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-05-28T15:36:18+00:00Added an answer on May 28, 2026 at 3:36 pm

    The problem was caused by a space in the data url I was using. It seems that the desktop browsers can handle a space properly, however the mobile browsers convert the space into a %20% character. jQuery mobile attempts to use a space, but the browser only remembers the altered character.

    EDIT:
    The jqm page has a data-url attribute that allows you to store multiple pages inside one html document.

    <html>
    <head> ... </head>
    <body>
    <div data-role="page" data-url="page-one"> ... </div>
    <div data-role="page" data-url="page two"> ... </div>
    </body>
    </html>
    

    The first pages can be loaded in a few ways…

    In a document

    <a href="#page-one">
    

    or through javascript

    $.mobile.changePage("#page-one");
    

    The problem I had was with the page with the data-url page two. On the desktop browsers the space was maintained, and the customized history control built into jqm continued to function as expected. but on the mobile browsers, the space turned into an escaped space, which the jqm history control did not recognize or track.

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

Sidebar

Related Questions

The problem I'm having with writing a web application architecture is that I want
I am having a problem using the Unity Application Block, I have created a
I'm using Intelligencia's UrlRewriter in my application and I'm having a problem where the
I'm having a bit of a problem with an application I am writing in
I'm having a problem with a Cocoa application I am writing. It has to
I an writing a VoiceXML app and i am having a problem. The application
I am writing a small Java Application and I am having problems with a
I'm having a problem with an application hanging and giving me the default Please
I'm having a problem compiling an application which uses Core-Plot in debug mode. It
We are having problem with the server migration. We have one application that are

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.