Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No iOS support yet. Fixes #38

  • Loading branch information...
commit 3cc48fc8445003d197ffd095e7d1d3ea9b7f9a09 1 parent 18cc2ce
@defunkt defunkt authored
Showing with 4 additions and 11 deletions.
  1. +4 −11 jquery.pjax.js
View
15 jquery.pjax.js
@@ -232,17 +232,10 @@ if ( $.inArray('state', $.event.props) < 0 )
// Is pjax supported by this browser?
-// http://stackoverflow.com/questions/6161701/is-history-api-broken-on-ios-location-bar-doesnt-update-on-pushstate
-// pushState enabling determination stolen from https://github.com/balupton/history.js
-$.support.pjax = Boolean(
- window.history && window.history.pushState && window.history.replaceState
- && !(
- /* disable for versions of iOS before version 4.3 (8F190) */
- (/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i).test(navigator.userAgent)
- /* disable for the mercury iOS browser, or at least older versions of the webkit engine */
- || (/AppleWebKit\/5([0-2]|3[0-2])/i).test(navigator.userAgent)
- )
-);
+$.support.pjax =
+ window.history && window.history.pushState && window.history.replaceState
+ // pushState isn't reliable on iOS yet.
+ && !navigator.userAgent.match(/(iPod|iPhone|iPad|WebApps\/.+CFNetwork)/)
// Fall back to normalcy for older browsers.
Please sign in to comment.
Something went wrong with that request. Please try again.