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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:05:53+00:00 2026-05-27T13:05:53+00:00

We are using jQuery to perform ajax calling. We use different methods – $.get

  • 0

We are using jQuery to perform ajax calling. We use different methods – $.get, $.getScript, $.post etc.

I would like perform a session check on every ajax call and once session found function should proceed to perform what is define in it’s body. Rather to perform such check by explicitly call a function in every place where ajax method is used is there better way to this?

Hypothetically, assume all jQuery ajax methods have a base method, we can use that base to perform the session check. Is such thing possible?

Thanks.

  • 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-27T13:05:53+00:00Added an answer on May 27, 2026 at 1:05 pm

    I think you can use global ajax event handler:

    These methods register handlers to be called when certain events, such
    as initialization or completion, take place for any AJAX request on
    the page. The global events are fired on each AJAX request if the
    global property in jQuery.ajaxSetup() is true, which it is by default.
    Note: Global events are never fired for cross-domain script or JSONP
    requests, regardless of the value of global.

    source

    ======
    I think you should use ajaxSend event:
    see here: http://docs.jquery.com/Ajax_Events
    ajaxSend will triggered on each ajax request, and

    This global event is also triggered before the request is run

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

Sidebar

Related Questions

I am using JQuery to perform form submission through an ajax request. I use
I am trying to perform a simple jQuery AJAX attempt using either a .get()
I'm using jQuery.get() to perform an AJAX call to a service. My service returns
Hi I am using some ajax with jquery to perform a post of a
Can I use the following jQuery code to perform file upload using POST method
I am trying to perform an ajax.get using jquery within document.ready . But the
I was looking for way to perform form (post) request with SOAP using jQuery/AJAX.
I'm using jQuery to perform ajax callback and deal with lot of objects (over
At the moment I am using the ajax function like so: $.ajax({ type: 'get',
I am using Rails and jquery with RJS templates to perform various AJAX requests.

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.