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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:48:21+00:00 2026-06-09T23:48:21+00:00

I’m pulling my hair out with this one… My app is running on jquery-mobile

  • 0

I’m pulling my hair out with this one…

My app is running on jquery-mobile (1.1.1), jquery (1.7.2) and requireJS on the front end. Running the app in Mobile Safari on (ipad1+3, iOS3+5) works fine, but if I open the app through the home screen icon using

   <meta name="apple-mobile-web-app-capable" content="yes" />

all my Jquery Mobile AJAX requests to load new pages or go back/forth between pages fail. Instead the error loading page message briefly blinks before the linked to page simply gets freshly loaded, restarting my app.

I have been sitting on this for two days now and have tried all of the following:

manifest (I’m actually not using a manifest, just tried to see whether it helped)

  • add network resources > didn’t help

requireJS

  • remove requireJS completely from my app > still doesn’t work
  • cache busting > didn’t help

offline

  • set isLocal

But I’m still stuck with pages not being loaded and the navigation breaking.

The one cause that made sense to me was in this blog post, which argued that Safari uses a different HTTP User-Agent string in fullscreen mode vs Mobile Safari. The strings passed in fullscreen seem unrecognizable resulting in only basic browser settings being expected (such as no javascript support).

The workaround (for ASP.net) posted is faking the user-agent like so:

 protected void Page_PreInit(object sender, EventArgs e) {
     if (Request.UserAgent != null && Request.UserAgent.IndexOf("AppleWebKit", StringComparison.CurrentCultureIgnoreCase) > -1) {
        this.ClientTarget = "uplevel";
        }
      }

Question:
How would I include a fix like this (~ faking the user agent) in Javascript/Jquery when iOS fullscreen mode is active (is this detectable at all)? Also I’m curious whether there are any caveats to this approach? Seems wrong…

  • 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-09T23:48:22+00:00Added an answer on June 9, 2026 at 11:48 pm

    If it is the problem with user-agent then it is simply impossible to solve with javascript. The user-agent cannot be changed through a javascript. It is sent to the server by the application (web browser) before a javascript is downloaded. trying any trick with javascript does not work either since it is specified in the XMLHttpRequest standard that a request must be immediately terminated if the script is trying to change any of these headers ( JQuery Ajax Request: Change User-Agent ):

    Accept-Charset
    Accept-Encoding
    Access-Control-Request-Headers
    Access-Control-Request-Method
    Connection
    Content-Length
    Cookie
    Cookie2
    Content-Transfer-Encoding
    Date
    Expect
    Host
    Keep-Alive
    Origin
    Referer
    TE
    Trailer
    Transfer-Encoding
    Upgrade
    User-Agent
    Via
    

    My guess is that this is for security reason.

    Alternative, detect the user-agent on of the request on server-side and return code that work for that specific user-agent but, of course, no one wants to do more work.

    Are you sure if the user-agent is really different? I cannot think of why your own code would not work if the user-agent is different without you knowing it. The only reason may be in the third party javascript library you use.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

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.