paulirish/infinite-scroll — pull request #221 by ndtreviv (2012-09-21 09:22:07+00:00)
Title: Added pre-ajax pathMod callout option

When using this fantastic plugin in IE9 I discovered IE was caching the ajax requests. I've had this problem before. IE, depending on user caching preferences, still likes to ignore all the various anti-caching mechanisms when using GET requests (obviously POST requests are safe). Personally, the only way around this for me was to add a timestamp to the GET parameters, thus forcing IE to believe the location was unique, unseen and therefore not to be retrieved from any cache.

Therefore I've added a new user option (under pathParse) called pathMod. If set, the pathMod function is called after the desturl is built and before the requests are made. It sends in the desturl and expects a return.

For me this, enables the addition of a timestamp to the request. Other users may want to fiddle their paths in other ways.