Skip to content
Etienne Baudry

Etienne Baudry

World Wide Web Developer

  • Blog
  • Portfolio
  • About
  • Contact
Posted on April 2, 2015October 10, 2017 by etienne

Is the Request Made with Ajax ?

function is_ajax_request() {
    return ! empty( $_SERVER['HTTP_X_REQUESTED_WITH'] )
        && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) === 'xmlhttprequest';
}
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Twitter (Opens in new window)
CategoriesFunction TagsPHP

Post navigation

Previous PostPrevious Is the Browser Older Than Internet Explorer $version ?
Next PostNext Sanitize $value According to its $type

Twitter

My Tweets

Archives

  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • May 2015
  • April 2015
  • January 2015
  • October 2014
  • May 2014
  • March 2014
  • February 2014
  • September 2013
  • July 2013
  • April 2013
  • March 2013
  • January 2013
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Tags

  • 3D
  • Access Point
  • Angular
  • API
  • Bootstrap
  • Communication
  • CSS
  • Desktop Application
  • Electron
  • ES6
  • Facial-Recognition
  • Front-End
  • Geolocation
  • Google Maps
  • Internet of Things
  • JavaScript
  • jQuery
  • LESS
  • Material Design
  • Parallax
  • Path Finder
  • PHP
  • Python
  • qTranslate
  • Raspberry Pi
  • React
  • Reddit
  • Redux
  • Sass
  • Search Engine
  • Settings
  • Sound Design
  • SVG
  • Three.js
  • UI
  • websocket
  • WordPress
  • GitHub
  • Twitter
  • LinkedIn
Proudly powered by WordPress