i have been using "window.location.href" for a long time now without any issues.
the URL is calling a server process that first initiates a conversion and a download, and it usually takes just a second or two. but occasionally the server conversion/download process might take much longer. when this happens, my users see a nasty "timeout" message.
so, i am trying to determine if there is any way, possibly using the magic of jquery, something like:
$(location).attr('href',url, function() {
success: {
// success stuff
}
failure: { // failure stuff
}
});
i thought about using .ajax too, but i didnt think i would be able to have the results written to the disk using jQuery. it seemed a lot easier to stick with windows.location.href if possible.
another possibility is to figure out some way to control how long "window.location.href" is willing to wait. maybe using setTimeout() somehow ?
thank you very much.