Is there a way to tell webbrowser to continiue script that is "stuck"?
<p>I have created this recursive script that checks what address your on, and then checks in another file hierarchy if that folder your in are in, also exists on that place. Like for example say you're on somerandomsite.com/example/folder/folder1/folder1_1  and then you might want to redirect the user to somerandomsite.com/<strong>another</strong>/example/folder/folder1/folder1_1 if that folder exists, otherwise just redirect him to somerandomsite.com/another (of course I have som special cases as well, like if folder/folder1/ exists but not folder/folder1/folder1_1, then redirect to somerandomsite.com/<strong>another</strong>/example/folder/folder1/ etc. </p>

<p>Now to my problem, I have a real slow recursive implementation, and say that there are 50 folders in folder "example", 100 folders in folder, another folders in folder1, and last 100 folders the last level, then my implementation takes long time to "match" all the names.</p>

<p>So some browsers display an error message that "some script has stopped working" since it is taking to long to execute. So my question is if there is some way to tell the browsers to let the script finish?</p>

<p>You can find the code for    <a href="http://jsfiddle.net/VpGnS/63/" rel="nofollow">the script here</a>.</p>

<p>And for those who wounder how I perform the directory searches is that im creating xmlhttprequests to folders, and get a html version displaying all the folders, and then do a simple pattern match for each folder level. In the example above I do 4 xmlhttpRequests, </p>

<p>One to somerandomsite.com, patternmatch for <strong>"example"</strong> </p>

<p>One to somerandomsite.com/example/ patternmatch for <strong>"folder"</strong> </p>

<p>One to somerandomsite.com/example/folder/ patternmatch for <strong>"folder1"</strong> </p>

<p>One to somerandomsite.com/example/folder/folder1/ patternmatch for <strong>"folder1_1"</strong>  </p>
