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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:42:35+00:00 2026-06-02T21:42:35+00:00

I have some found some stange behaviour in jQuery Mobile that I can even

  • 0

I have some found some stange behaviour in jQuery Mobile that I can even repoduce on the demo website:

  1. go directly to http://jquerymobile.com/test/docs/forms/textinputs/
  2. enter something in a text input
  3. click any link on the page and enjoy the ajax-y animation
  4. go back using the browser’s back button

Result: The text entered in the text input is still there. This is what I want.

However, this breaks if you come from somewhere on the site:

  1. go to http://jquerymobile.com/test/docs/forms/
  2. klick on “Text inputs”
  3. do steps 2 to 4 from above

Result: The text entered in the text input has disappeared. This is not what I want.

I tested this on Chrome for Desktop and the Windows Phone emulator, both show the same behavior. What can I do to always preserve the text entered in the text input? In my case this is a search box. I want the user to be able to refine the search terms after navigating back from the search results without having to enter everything again.

  • 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-02T21:42:38+00:00Added an answer on June 2, 2026 at 9:42 pm

    It’s because, when you come from docs/forms, ajax is disabled at the beginning. So, then, jQueryMobile disable dom-cache. You can force dom cache by adding this before your loading jquerymobile.js :

    $(document).bind("mobileinit", function() {
        $.mobile.page.prototype.options.domCache = true;
    });
    

    Edit :

    My solution works, i just tried it :

    • Go on my demo page ;

    • Click on “Text inputs”

    • Enter something in “Text Input:”

    • Click on “Search input” on the left side (just some links works in my demo)

    • Go back using the browser’s back button

    Your text is still there !

    (Note : This page show the originale version, with the problem, and so without domCache, to prove that i didnt change anything else when i duplicate jQueryMobile-Docs Pages to do my demo).

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

Sidebar

Related Questions

I'm hacking my way through learning Flex and have found some strange behaviour. When
I have found some code that I need to use for my application but
I have found some in the Cappuccino website (vim, textmate and SubEthaEdit), but not
I have found some libraries or web services in PHP that does the job.
I have found some code on measuring execution time here http://www.dreamincode.net/forums/index.php?showtopic=24685 However, it does
Have done some research and found some stuff that may be helpful. I would
I have found some info on the subject ( like this link) , but
I have found some code snippet in the internet. But it is missing some
i have found some ways but they are actually reading frames and applying transition
I have found some interesting behavior and do not know why or how to

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.