From: Adam M. <ad...@ar...> - 2012-12-06 00:45:14
|
I haven't tried this in wayback yet, but I've had some success with wrapping JavaScript functions in the browser in the past. I tend to use the following pattern: window.XMLHttpRequestBase = window.XMLHttpRequest; window.XMLHttpRequest = function(){ var base = new window.XMLHttpRequestBase(); base.openBase = base.open; base.open = function(sMethod, sUrl, bAsync, sUser, sPassword){ //console.log("XHR "+sMethod+": "+sUrl); //manipulate sUrl here return base.openBase(sMethod, sUrl, bAsync, sUser, sPassword); } return base; } This should be adaptable to window.open and the various alternatives for JS redirects. This example would be useful for intercepting ajax requests. I've been meaning to play with this myself. Let us know how this works out. Adam Miller On Dec 5, 2012, at 5:03 AM, "Jackson, Andrew" <And...@bl...> wrote: > We’re using the server-side rewriting engine, and it’s not catching this case. We’ll probably experiment with injecting JavaScript to override the window.open function so that there’s a re-write in the function invocation chain, but would be interesting to know if anyone has already tried this or other approaches. > > Thanks again, > Andy > > From: Bjarne Andersen [mailto:bj...@st...] > Sent: 05 December 2012 12:04 > To: Jackson, Andrew; arc...@li... > Subject: SV: [Archive-access-discuss] Can Wayback cope withwindow.open('{URL}','_self'); ? > > I have a feeling that this is not possible when using the broswer-based rewriting engine. > You would need to use either the serverside rewriting (I never tried that) or proxy based replay (which we allways use at Netarchive.dk to gain the most optimal replay) to catch a thing like this. > > Best > Bjarne > > Fra: Jackson, Andrew [mailto:And...@bl...] > Sendt: 5. december 2012 12:32 > Til: arc...@li... > Emne: [Archive-access-discuss] Can Wayback cope with window.open('{URL}','_self'); ? > > Hi All, > > We’re having problems with live-leakage, in that if you go to: > > http://www.webarchive.org.uk/wayback/archive/20081212111012/http://www.woolworthsgroupplc.com/site/woolworths.asp > > Then some JavaScript immediately redirects you to the live version of the site: > > window.open('http://www.woolworths.co.uk/','_self'); > > Does anyone know if there is any existing code in Wayback one can use to override this behaviour? > > Thanks for your time, > Andy Jackson > > -- > Andrew Jackson > Web Archiving Technical Lead > The British Library > > Tel: 01937 546602 > Mobile: 07765 897948 > Web: www.webarchive.org.uk > Twitter: @UKWebArchive > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d_______________________________________________ > Archive-access-discuss mailing list > Arc...@li... > https://lists.sourceforge.net/lists/listinfo/archive-access-discuss |