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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:31:40+00:00 2026-06-10T23:31:40+00:00

As we know, JQuery mobile has problems with redirects from server. What is the

  • 0

As we know, JQuery mobile has problems with redirects from server.

What is the best way to have only one secured page on site?

Here is scenario:

  1. User goes to root of site ->
  2. User goes to payment page ->
  3. <- Server redirects user to https payment page #On this step we can
    use data-ajax=false
  4. User at payment page goes to any other page -> #We should have all
    links on page with data-ajax=false? Looks terrible. What is the proper
    way to get user out from this page to unsecured pages?

UPD This question is not only about mobile sites, it’s about all sites, that use ajax intensively.

  • 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-10T23:31:41+00:00Added an answer on June 10, 2026 at 11:31 pm

    One way to handle this is to detect the failed page load that is inherent to making a cross-domain AJAX call and attempt to change the protocols. AJAX and page transitions won’t work using this approach, however, it prevents you from having to litter your site with data-ajax=false attributes. This works in both directions (i.e. both to and from HTTPS).

    $(document).bind("pageloadfailed", function (event, data) {
    
        // Let the framework know we're going to handle things.
        event.preventDefault();
    
        // Attempt to change protocols
        window.location.href = data.absUrl.indexOf('https://') > -1 ?
            data.absUrl.replace('https://', 'http://') :
            data.absUrl.replace('http://', 'https://');
    
        // At some point, if the load fails, either in this
        // callback, or through some other async means, call
        // reject like this:
        data.deferred.reject(data.absUrl, data.options);
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know of a way to make jQuery Mobile load only on pages
Jquery Mobile has decided to treat anchor links as page requests of sort. However,
I'm using Jquery Mobile and have the same form on every page. As Jquery
I have my jquery mobile app pulling data from our mysql db using JSONP.
I am looking for a way to produce the jQuery mobile horizontal page transition
I have JQuery Mobile-1.0.js file. // Load a page into the DOM. $.mobile.loadPage =
I have a little problem about using jQuery (I really do not know jQuery
I know Drupal 7 jQuery code needs to be wrapped in a way which
Does anyone know of a jQuery plugin that has 'helpers' or extensions like those
jQuery mobile 1.0 I change the content of the page, to put it simple:

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.