Without going into too much detail, let me explain a little bit what
I'm trying to do.
My web server will sometimes serve a page that will cause a series of
redirects. The first redirect is done by the page's JavaScript calling
window.location.replace(). The next page may then trigger a sequence
of HTTP 302 redirects. Eventually, we end up on the destination page.
So, for example, we may have this chain of events:
1.
www.MyDomain.com/redirect.aspx -> window.location.replace( URL_2 );
2. URL_2 -> (302) URL_3
3. URL_3 -> (302) URL_4
4. URL_4 -> (302)
www.MyDomain.com
There is a business reason for doing these redirects.
Now, in order to improve the user experience (so the user doesn't have
to watch these redirects happen), I would like to:
a) In Step 1 above, programmatically remove the path from the URL, and
just load
www.MyDomain.com into the active tab.
b) Open a hidden tab (or an invisible Chrome window), and point it to
www.MyDomain.com/redirect.aspx, which should cause the above redirect
sequence happen in the "background" (invisible to the user).
(I would also use chrome.tabs.onUpdated() to detect when the redirect/
navigation is complete in the background tab, and close the tab.)
I haven't found a way to do that. I don't know if I can make a Chrome
tab hidden.
I also tried creating an invisible Chrome window:
chrome.windows.create( {url: "
www.MyDomain.com/redirect.aspx" , width:
0, height: 0} );
but that didn't work. "width: 1, height: 1" didn't work, either.
There seems to be a low limit on "with" and "height", as the window,
although small, is always visible.
Thanks