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

The Archive Base Latest Questions

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

We have a uiWebview which uses jquery to make an ajax request in order

  • 0

We have a uiWebview which uses jquery to make an ajax request in order to log in. It works perfectly from mobile safari and from all browsers.

When running the application for the first time after installation, the ajax request appears to go out but no response is ever received and neither the failure or complete events for the ajax request ever fire.

We used the method found here: UIWebViewDelegate not monitoring XMLHttpRequest?

to monitor the requests to see if they are actually being sent and they appear to go out but no response is ever received.

If we then exit the app, kill the running process, and restart it, everything works perfectly. What could be preventing it from working on the first run?

function makeLoginRequest(){    
//alert('about to make login request');

var loginInfo='{"username":"'+$("#tbUserName").val()+'","password":"'+$("#tbPassword").val()+'"}';      
jQuery.ajaxSetup({ 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript,application/javascript,text/html,application/json")} });

var loginRequest=$.ajax({
      type:'POST',
      url: 'http://ourURL.com/api/user/login.json',
      data: loginInfo,
      contentType: 'application/json', 
      dataType: 'json',
      success: function(data){
          var sessionID = data["sessid"];
          var session_name= data["session_name"];
          var userID=data.user["uid"];  
          redirectString ='ProfileView.htm?uid='+userID+'&sessionID='+sessionID+'&session_name='+session_name;
          saveUsername();
          $('window').attr('location', redirectString).delay(1000);
          if(enableConsoleLogging)console.log("login attempt succeded.");
          logDeviceData();
          setTimeout(function (){window.location=redirectString;},0);
      }
});     
loginRequest.done(function (data) {
        if(enableConsoleLogging){
            //alert('login attempt complete.');
            console.log("login attempt complete.");
            console.log(data);
        }
});
loginRequest.fail(function(data) {
    if(enableConsoleLogging){
        //alert("login attempt failed.");
        console.log("login attempt failed.");
        console.log("statusText: "+data.statusText);
        console.log("responseText: "+data.responseText);
    }
    loginFailed(data);          
});

}

  • 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:17:49+00:00Added an answer on June 9, 2026 at 11:17 pm

    We’re using Drupal with Varnish on the back end of the site. Varnish was aggressively caching things and not responding to requests that weren’t cached. restarting varnish fixed the issue.

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

Sidebar

Related Questions

I have a UIWebView which loads videos from an external server. The code seems
I have a uiwebview which loads documents from local file system. Some of the
I have two questions which make me in trouble. I drap a UIWebView on
I have a UIWebView with links in the text which open Safari if pressed.
I have UIWebView which has loaded an image from the internet. I have a
I have a view containing a UIWebView which is loading a google map (so
I have a UIWebView in my app which I want to use to display
I have one UIViewController (DownloadManager) which downloads a webpage with UIWebView and display the
I have a piece of HTML which I am displaying inside a UIWebView using
I am trying to have a UI which is a full screen UIWebView. When

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.