{"_id":"pace-js","_rev":"16-6844768da44faa2fb1e7d0ad40cac95a","name":"pace-js","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.2":{"name":"pace-js","version":"1.0.2","license":"MIT","_id":"pace-js@1.0.2","maintainers":[{"name":"drmartin","email":"drmartinkf@gmail.com"}],"homepage":"https://github.com/HubSpot/pace#readme","bugs":{"url":"https://github.com/HubSpot/pace/issues"},"dist":{"shasum":"673a717f833ccb4f4315531b75ee4788376600f7","tarball":"https://registry.npmjs.org/pace-js/-/pace-js-1.0.2.tgz","integrity":"sha512-5rIBZm4u7xQz2eYWwatBfUnurKxXRyO6meLvlxhQYyhJZoZDjvLt249nUikj9VMpmtMR0owHqade9RSSNRT/GQ==","signatures":[{"sig":"MEYCIQDIJzsRdM5IgPpGqtRSTVd5opLfU2NA7Up3ovQ62zkelgIhAJKo5Rpk+Mv2LRvjGQzj2S4pij80Qum5u3ESERNkkiZ9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"pace.js","_from":".","_shasum":"673a717f833ccb4f4315531b75ee4788376600f7","authors":["Zack Bloom <zackbloom@gmail.com>","Adam Schwartz <adam.flynn.schwartz@gmail.com>"],"gitHead":"a03f1f1de62c9cea6c88b2267b8d7a83858b6cb6","scripts":{},"_npmUser":{"name":"drmartin","email":"drmartinkf@gmail.com"},"repository":{"url":"git://github.com/HubSpot/pace.git","type":"git"},"_npmVersion":"3.9.3","description":"Automatic page load progress bar","directories":{},"_nodeVersion":"0.12.5","devDependencies":{"color":"~0.4.4","grunt":"~0.4.1","grunt-cli":"~0.1.9","coffee-script":"~1.6.3","grunt-contrib-watch":"~0.5.3","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.4"},"_npmOperationalInternal":{"tmp":"tmp/pace-js-1.0.2.tgz_1469067243584_0.3091979119926691","host":"packages-16-east.internal.npmjs.com"}},"1.2.3":{"name":"pace-js","version":"1.2.3","keywords":["pace","pace-js","pace.js","progress-bar","loading-bar","loading-indicator","loading-animation"],"author":{"name":"CodeByZach","email":"codebyzach@gmail.com"},"license":"MIT","_id":"pace-js@1.2.3","maintainers":[{"name":"codebyzach","email":"codebyzach@gmail.com"}],"homepage":"https://github.com/CodeByZach/pace#readme","bugs":{"url":"https://github.com/CodeByZach/pace/issues"},"dist":{"shasum":"c3bdb6270055ad31f7a34062ba8a915e6b2d5b41","tarball":"https://registry.npmjs.org/pace-js/-/pace-js-1.2.3.tgz","fileCount":172,"integrity":"sha512-j49QzN2ZaT+xySxfdEJ2lavHTYQDlSUvwKJMla7McrqCW9vYcRYXM9fU+hhuqHl0PEACRu3QffI4+XX+OOSbzA==","signatures":[{"sig":"MEQCIAyXX/saeGd1A+H4+BG0saj0U2XDTVo/uw4AlHVOSrqQAiB+aBW7q4Yqg837w5TEeauAkOttDQ13g2u9gfNpx9JE2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":816526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJFDpCRA9TVsSAnZWagAAZj4QAIgBDrODbhzy7qxIiQ9q\nNHFjQZirymD+dBQpE0eesiuVNQUaa3Q2NI05rvwfLH7LdDCri8o4bMnfI74u\ndXIaXhY6bwEqO8d8mtRMaKBTeYU7e0rK9xMdf9l+yt4E1TjGBOKOG7rFWfPo\nwzVY2G/PoMNpWIO8vQ5fqXBUVpgfE8dOJBjXE09WzDyjdi5LimA3APehtXzF\nFXOHfC8zALbNjpEA/yS2wVzwpdYZyJQHubSp3MCInd3b7ap/W++7SYQMB6mn\n+t12VWdkd8HKbh7cE5XVKSzpU7jtCC+4kMNbaq9ufmLV5o0VcxvcLDL7KpbK\nJhYTDiYr7hQuoUq2amlQuqtvp+JuGsNqh88fZgSluF0fFoMt+2olX/p5uZ0E\nCILNfAZ0OVJJL6GcanMGIShCAIA6yLO+M1qKhceCeH9OyQ+YGAbApUnW6XTJ\nX8cwghBvg2znQpuKrFkYHNlOyflUgW6aXkX5ev2eMV7OrVtb255lMDEuymqD\n9AS1IDyjM9v3SunXdUdeIich9LYQBfK2JkWk0UVkP9YY3MgGCjDTjRIn9j18\nJVhYavaWxVXcpRiQ2UaX+3pF4kBtQ4C9JSg3p4lOw9iQ3gxDAIaiqZYGNUja\nVVp5dIyNJM9FnWolIh3Xt/bJjW14378lDYTPY9+msypA6Q0FcZYXXYGfGPN0\n04vs\r\n=qpCM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"pace.js","gitHead":"e1a74a3e837903ee1f436c3c20c47dbc6736ca22","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"codebyzach","email":"codebyzach@gmail.com"},"repository":{"url":"git+https://github.com/CodeByZach/pace.git","type":"git"},"_npmVersion":"7.5.0","description":"Automatically add a progress bar to your site.","directories":{},"_nodeVersion":"15.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pace-js_1.2.3_1612992745358_0.9110269123613237","host":"s3://npm-registry-packages"}},"1.2.4":{"name":"pace-js","version":"1.2.4","keywords":["pace","pace-js","pace.js","progress-bar","loading-bar","loading-indicator","loading-animation"],"author":{"name":"CodeByZach","email":"codebyzach@gmail.com"},"license":"MIT","_id":"pace-js@1.2.4","maintainers":[{"name":"codebyzach","email":"codebyzach@gmail.com"}],"homepage":"https://github.com/CodeByZach/pace#readme","bugs":{"url":"https://github.com/CodeByZach/pace/issues"},"dist":{"shasum":"699aa54c76411ec0297ac06a8cddb6e11e01db99","tarball":"https://registry.npmjs.org/pace-js/-/pace-js-1.2.4.tgz","fileCount":172,"integrity":"sha512-qnCxtvUoY9yHId0AwMQCVmWltb698GiuVArmDbQzonTu9QCo0SgWUVnX9jB9mi+/FUSWvQULBPxUAAo/kLrh1A==","signatures":[{"sig":"MEUCIQDtxKKZ5PM1MqrEWCuKf7rjzsLt2Eq1g9gG6Bx9zredkgIgdvq4Mm3pb+LAPM96xpN2+/ojnmSXj+eS4C9QvAMv75Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":817351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPwwECRA9TVsSAnZWagAAvakQAJ8OXFJpnWbP+Rkn/lcx\nibMZURGFzWk0MJCCI/pajqEIX5PXStKA6qUv9eQi89qpAd2wRPcX9/zEsdt0\nQ+uf9nNbboMOlPgqJmhBRQwuhKVElfYHzC7yokMDi8kMFKBEij8g2jHjyT7y\ngA+Ge7EES3O3ZWm26s/wNlMVW88NPcXI2nLo3doEC7PRDTuRy63txm+V63va\n6zJ4OvV4CvQ0Wu6c7d3n2JypC+N62DA1wY4jiAYQetMa5s6SDQMUHN8+6cTb\npSVq51ogN29oyb9s2RQfPRCv3dPKQvOXWIF6BbYxpLdkXvfv6as8c+UOsMND\neAwUeM6+CiVt7t8+Jr2RwLgkwa0SbHOABPp85698oVkKAqfuCVonnUUP5run\nqJ74TNd6a8u9LptPVq/y40UwZvVUT8pkiRTTueQxDM4cGGZXaUrN+4joDl1/\nQaoAaVdG9BCTZ7q+3qlOMnBgS5n2/TZY7pX6OZpy/hR/cOsQjbsx5jsoftvw\nVsiiCHIlSbCdGBk6fZz2Jp+Iremwm2AsfosxjPguUwxarA9ZjPYW3N7jdMlz\nQ8NHEvr0I78iZ36EgkA63u/hi0JrUf8JsGuvHDHyhpJV+2u5XmM6HdbOhZOA\nXBMKvzsVeVC6m3C66W721oKBglDUg2axh0/CzRZSMefGpOcnqFOuBsWKBVLJ\n+Q7s\r\n=MWYe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"pace.js","gitHead":"f7910422b155e57f81ade87c7a45cb1708d935b7","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"codebyzach","email":"codebyzach@gmail.com"},"repository":{"url":"git+https://github.com/CodeByZach/pace.git","type":"git"},"_npmVersion":"7.5.3","description":"Automatically add a progress bar to your site.","directories":{},"_nodeVersion":"15.10.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pace-js_1.2.4_1614744580368_0.3318663901014771","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"pace-js","version":"1.3.0","keywords":["pace","pace-js","pace.js","progress-bar","loading-bar","loading-indicator","loading-animation"],"author":{"name":"CodeByZach","email":"codebyzach@gmail.com"},"license":"MIT","_id":"pace-js@1.3.0","maintainers":[{"name":"codebyzach","email":"codebyzach@gmail.com"}],"homepage":"https://github.com/CodeByZach/pace#readme","bugs":{"url":"https://github.com/CodeByZach/pace/issues"},"dist":{"shasum":"0cab7d52d5794253bba95004b3789826acd38745","tarball":"https://registry.npmjs.org/pace-js/-/pace-js-1.3.0.tgz","fileCount":172,"integrity":"sha512-gUr/8MvgkUkE2MrUogFAQPRgy0f2qTMoCVgocaZk+6SSgH6zY8c1zXfd0TNXGoE43/dShvA6q60jX4uk0fhLiA==","signatures":[{"sig":"MEQCIFPkWV4cYk9t6hy6REMyIdOtXweBp+LyMDfisgdYEJlCAiA0sYH7FmlmWadmX1/J70Sn0Ezac41e6uAuiJt4Z7SrAQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCg07UbU7wW2V8YAGavGW9IXPGwgZj/+lfm+Nv9F9Zf/AIgc8ADwnTOf9F9cd91GonvYFuLALnFAkxxgGrC1nvCXoU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pace-js@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":823671},"main":"pace.js","style":"pace-theme-default.css","gitHead":"057cc7bc978777c63d1f41a0408a34f36e638507","scripts":{"test":"npm run test:syntax && npm run test:browsers","build":"node scripts/build.mjs","test:syntax":"acorn --ecma5 --silent pace.js pace.min.js","test:browsers":"playwright test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"ba83eca9-b7a0-4e39-91e4-119e949c8a33"}},"devEngines":{"runtime":{"name":"node","onFail":"error","version":"^26.0.0"}},"repository":{"url":"git+https://github.com/CodeByZach/pace.git","type":"git"},"_npmVersion":"11.20.0","description":"Automatically add a progress bar to your site.","directories":{},"_nodeVersion":"26.13.0","_hasShrinkwrap":false,"devDependencies":{"acorn":"8.19.0","esbuild":"0.28.2","@playwright/test":"1.64.1"},"_npmOperationalInternal":{"tmp":"tmp/pace-js_1.3.0_1793582040346_0.5147047617194884","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"_id":"pace-js@1.3.1","bugs":{"url":"https://github.com/CodeByZach/pace/issues"},"dist":{"shasum":"cd7c6229ad10e614f324f6a31828d427b5123832","tarball":"https://registry.npmjs.org/pace-js/-/pace-js-1.3.1.tgz","fileCount":172,"integrity":"sha512-EJus0KXPp9A23uU4Lyn6DOxA6jHSR8hVaS49nC9+x3/HyVOPil5YvRUw/PoYWVqvTMhFNH1PToJ8HDkeMm4wCw==","signatures":[{"sig":"MEUCIEJy+XlxlBS8jsd5qPy9CI0OvggMTl/Eh1T8BkDUv5o4AiEA29NHQPAS/tZXgpzcoHrwB86ZpqYjZP+dkpz+SMlh+1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC189d+zRomQMsn2UROfnxpyIU6saolcZv+rHxgzDP2bAIhAIlA+ppIlX3VTMpQaby8XKYf0ZPj7HN//4Mt0ZRsoqij"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pace-js@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":824116},"main":"pace.js","name":"pace-js","style":"pace-theme-default.css","author":{"name":"CodeByZach","email":"codebyzach@gmail.com"},"gitHead":"f8119e4fa12554afeb0f9672def1cd1b6fb65d40","license":"MIT","scripts":{"test":"npm run test:syntax && npm run test:browsers","build":"node scripts/build.mjs","test:syntax":"acorn --ecma5 --silent pace.js pace.min.js","test:browsers":"playwright test"},"version":"1.3.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"ba83eca9-b7a0-4e39-91e4-119e949c8a33"}},"homepage":"https://github.com/CodeByZach/pace#readme","keywords":["pace","pace-js","pace.js","progress-bar","loading-bar","loading-indicator","loading-animation"],"devEngines":{"runtime":{"name":"node","onFail":"error","version":"^26.0.0"}},"repository":{"url":"git+https://github.com/CodeByZach/pace.git","type":"git"},"_npmVersion":"11.20.0","description":"Automatically add a progress bar to your site.","directories":{},"maintainers":[{"name":"codebyzach","email":"codebyzach@gmail.com"}],"_nodeVersion":"26.13.0","_hasShrinkwrap":false,"devDependencies":{"acorn":"8.19.0","esbuild":"0.28.2","@playwright/test":"1.64.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pace-js_1.3.1_1793912360109_0.5453178391821271"}}},"time":{"created":"2016-07-21T02:14:06.830Z","modified":"2026-11-05T20:59:20.499Z","1.0.2":"2016-07-21T02:14:06.830Z","1.2.3":"2021-02-10T21:32:25.478Z","1.2.4":"2021-03-03T04:09:40.528Z","1.3.0":"2026-11-02T01:14:00.433Z","1.3.1":"2026-11-05T20:59:20.212Z"},"bugs":{"url":"https://github.com/CodeByZach/pace/issues"},"author":{"name":"CodeByZach","email":"codebyzach@gmail.com"},"license":"MIT","homepage":"https://github.com/CodeByZach/pace#readme","keywords":["pace","pace-js","pace.js","progress-bar","loading-bar","loading-indicator","loading-animation"],"repository":{"url":"git+https://github.com/CodeByZach/pace.git","type":"git"},"description":"Automatically add a progress bar to your site.","maintainers":[{"name":"codebyzach","email":"codebyzach@gmail.com"}],"readme":"PACE\n====\n[![Latest Release](https://img.shields.io/github/v/tag/CodeByZach/pace?label=release&sort=semver)](https://github.com/CodeByZach/pace/releases/latest) [![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/pace-js?color=%23ff5627)](https://www.jsdelivr.com/package/npm/pace-js) [![Stars](https://img.shields.io/github/stars/CodeByZach/pace.svg)](https://github.com/CodeByZach/pace) [![Forks](https://img.shields.io/github/forks/CodeByZach/pace.svg)](https://github.com/CodeByZach/pace/network/members) [![License](https://img.shields.io/github/license/CodeByZach/pace.svg)](LICENSE)\n\nAn automatic web page progress bar.\n\n### [Demo](https://codebyzach.github.io/pace/)\n### [Documentation](https://codebyzach.github.io/pace/docs/)\n\nInclude [pace.js](https://cdn.jsdelivr.net/npm/pace-js@1/pace.min.js) and the\n[theme](https://codebyzach.github.io/pace/) css of your choice on your page\n(as early as possible), and you're done!\n\nPace will automatically monitor your ajax requests, event loop lag, document\nready state, and elements on your page to decide the progress. On ajax navigation\nit will begin again!\n\nIf you use AMD or Browserify, require pace.js and call `Pace.start()` as early in the loading process as possible.\n\nExample\n-------\n\n```html\n<head>\n  <script src=\"https://cdn.jsdelivr.net/npm/pace-js@1/pace.min.js\"></script>\n  <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/pace-js@1/pace-theme-default.min.css\">\n</head>\n```\n\nConfiguration\n-------------\n\nPace is fully automatic, no configuration is necessary to get started.\n\nIf you would like to make some tweaks, here's how:\n\nYou can set `window.paceOptions` before bringing in the file:\n\n```javascript\npaceOptions = {\n  // Disable the 'elements' source\n  elements: false,\n\n  // Only show the progress on regular and ajax-y page navigation,\n  // not every request\n  restartOnRequestAfter: false\n}\n```\n\nYou can also put options on the script tag (the value must be valid JSON):\n\n```html\n<script data-pace-options='{ \"ajax\": false }' src=\"https://cdn.jsdelivr.net/npm/pace-js@1/pace.min.js\"></script>\n```\n\nPace reads its options once, when pace.js loads, so set them before including it.\nAssigning `Pace.options` afterwards has no effect.\n\nIf you load pace with a bundler or module loader (AMD or CommonJS), it doesn't start on its own:\nset `window.paceOptions` before pace loads, then call `Pace.start()`. `import` statements run\nbefore the rest of a file, so put the options in their own file and import it first:\n\n```javascript\n// pace-options.js\nwindow.paceOptions = {\n  document: false\n};\n```\n\n```javascript\n// your entry file\nimport './pace-options.js';\nimport Pace from 'pace-js';\n\nPace.start();\n```\n\nWith RequireJS, set `window.paceOptions` in a `<script>` before calling `require(['pace'], ...)`.\n\nThemes\n------\n\nPace includes a bunch of [themes](https://codebyzach.github.io/pace/)\nto get you started. Just include the appropriate css file. Send us a PR with\nany interesting themes you create.\n\nIf you have minor styling changes and don't want to extend theme css, you can add custom class names to\nthe progress bar using the \"className\" option:\n\n```javascript\npaceOptions = {\n  className: 'my-custom-class'\n}\n```\n\nCollectors\n----------\n\nCollectors are the bits of code which gather progress information. Pace includes four default collectors:\n\n- Ajax\n\n  Monitors ajax requests (XMLHttpRequest and WebSocket) on the page. Only `GET` requests are tracked by default, see Tracking below\n\n- Elements\n\n  Checks for the existence of specific elements on the page\n\n- Document\n\n  Checks the document readyState\n\n- Event Lag\n\n  Checks for event loop lag signaling that javascript is being executed\n\nThey can each be configured or disabled through configuration options of the same name.\n\n```javascript\npaceOptions = {\n  ajax: false, // disabled\n  document: false, // disabled\n  eventLag: false, // disabled\n  elements: {\n    selectors: ['.my-page']\n  }\n};\n```\n\nAdd your own classes to `paceOptions.extraSources` to add more sources. Each source should either\nhave a `.progress` property, or a `.elements` property which is a list of objects with\n`.progress` properties. Pace will automatically handle all scaling to make the progress\nchanges look smooth to the user.\n\nElements\n--------\n\nElements being rendered to the screen is one way for us to decide that the page has been\nrendered. If you would like to use that source of information (not required at all),\nspecify one or more selectors. You can comma separate the selectors to properly handle\nerror states, where the progress bar should disappear, but the element we are looking for\nmay never appear:\n\n```javascript\npaceOptions = {\n  elements: {\n    selectors: ['.timeline, .timeline-error', '.user-profile, .profile-error']\n  }\n}\n```\n\nPace will consider the elements test successful when each selector matches something. For\nthis example, when either `.timeline` or `.timeline-error` exist, and either `.user-profile`\nor `.profile-error` exist.\n\nRestart Rules\n-------------\n\nMost users want the progress bar to automatically restart when a pushState event occurs\n(generally means ajax navigation is occuring). You can disable this:\n\n```javascript\npaceOptions = {\n  restartOnPushState: false\n}\n```\n\nThis also covers links whose scripts change the URL with `history.pushState` or `replaceState`\n(some tab, accordion and scrollspy plugins do).\n\nPace also restarts for any tracked ajax request that is still running after `restartOnRequestAfter`\nmilliseconds (500 by default). Set a different number, or `false` to turn this off if you make ajax\nrequests the user doesn't need to know about, like precaching:\n\n```javascript\npaceOptions = {\n  restartOnRequestAfter: false\n}\n```\n\nYou can always trigger a restart manually by calling `Pace.restart()`\n\nSee [the source](https://github.com/CodeByZach/pace/blob/master/pace.js) for a full list of options.\n\nAPI\n---\n\nPace exposes the following methods:\n\n- `Pace.start`: Show the progress bar and start updating. Called automatically if you don't use AMD or CommonJS.\n\n- `Pace.restart`: Show the progress bar if it's hidden and start reporting the progress from scratch. Called automatically\nwhenever `pushState` or `replaceState` is called by default.\n\n- `Pace.stop`: Hide the progress bar and stop updating it.\n\n- `Pace.track`: Explicitly track one or more requests, see Tracking below\n\n- `Pace.ignore`: Explicitly ignore one or more requests, see Tracking below\n\nEvents\n------\n\nPace fires the following events:\n\n- `start`: When pace is initially started, or as a part of a restart\n- `stop`: When pace is manually stopped, or as a part of a restart\n- `restart`: When pace is restarted (manually, or by a new AJAX request)\n- `progress`: On every frame while the bar is running, with the current progress (0–100)\n- `done`: When pace is finished\n- `hide`: When the pace is hidden (can be later than `done`, based on `ghostTime` and `minTime`)\n\nYou can bind onto events using the `on`, `off` and `once` methods:\n\n- `Pace.on(event, handler, [context])`: Call `handler` (optionally with context) when `event` is triggered\n- `Pace.off(event, [handler])`: Unbind the provided `event` and `handler` combination.\n- `Pace.once(event, handler, [context])`: Bind `handler` to the next (and only the next) incidence of `event`\n\nTracking\n--------\n\nBy default, Pace will show any ajax requests which begin as a part of a normal or ajax-y page load, or which last longer than\n500ms.\n\nOnly `GET` requests are tracked by default. To also show the bar for other methods, such as form saves sent with `POST`:\n\n```javascript\npaceOptions = {\n  ajax: {\n    trackMethods: ['GET', 'POST']\n  }\n}\n```\n\nYou can disable all ajax tracking by setting `ajax` to false:\n\n```javascript\npaceOptions = {\n  ajax: false\n}\n```\n\nYou can disable ajax tracking except on page navigation by setting `restartOnRequestAfter` to false:\n\n```javascript\npaceOptions = {\n  restartOnRequestAfter: false\n}\n```\n\nYou can manually disable tracking for a specific request or requests by triggering them within a `Pace.ignore` callback:\n\n```javascript\nPace.ignore(function() {\n  $.ajax(...)\n});\n```\n\nYou can force the progress bar to be shown for a specific request by triggering them within a `Pace.track` callback:\n\n```javascript\nPace.track(function() {\n  $.ajax(...)\n});\n```\n\nBoth only affect requests opened directly inside the callback, not ones started later (for example from a timer or a promise).\n\nYou can also ignore URLs based on a pattern:\n\n```javascript\npaceOptions = {\n  ajax: {\n    ignoreURLs: ['some-substring', /some-regexp/]\n  }\n}\n```\n\nA string matches any ajax request URL that contains it (case-sensitive); a regular expression is tested against\nthe URL. These patterns only apply to ajax requests, not to links, images or other resources on the page.\n\nWebSocket connections are tracked too. To stop that, set `trackWebSockets: false` inside `ajax`.\n\nA few things Pace can't track:\n\n- Requests sent with `async: false` block the page until they finish, so the bar can't animate during them.\n- Downloads started by a plain link aren't ajax requests.\n\nAvoid calling `Pace.restart()` for every request, for example from jQuery's `ajaxStart`. It restarts the bar even for\nignored requests, and parallel requests restart it several times. To show the bar for `POST` requests, add `POST` to\n`trackMethods` as shown above.\n\nDependencies\n------------\n\nNone!\n\nSupport\n-------\n\nPace is designed to support IE8+ (standards mode), FF 3.5+, Chrome, Safari 4+, Opera 10.5+, and all modern\nmobile browsers. If you run into a compatibility issue, or can make a case for supporting something else,\nplease create an issue.\n\nSize\n----\n\npace.js is 4kb minified and gzipped. The themes vary between 0.5 and 4kb.\n\nIssues\n------\n\nWe have obviously not tested this on every website. If you run into an issue, or find a way the automatic\ndetection could be better, please [create an Issue](https://github.com/CodeByZach/pace/issues/new). If you can include a test case, that's even better.\n\nCredits\n-------\n\n[HubSpot](http://dev.hubspot.com)\n\n[CodeByZach](https://github.com/CodeByZach)\n\nJavascript by [Zack Bloom](http://twitter.com/zackbloom)\nCSS by [Adam Schwartz](http://twitter.com/adamfschwartz)\n\nThemes inspired by [Mary Lou](http://tympanus.net/codrops/2013/09/18/creative-loading-effects/)\n\nProject inspired by [nprogress](http://ricostacruz.com/nprogress/)\n","readmeFilename":"README.md","users":{"yisen":true,"drmartin":true,"brunoluizgr":true,"dallinrparker":true}}