Connecting Tech Pros Worldwide Forums | Help | Site Map

auto redirect every 3 seconds until redirected

mr_buggerlugs@hotmail.com
Guest
 
Posts: n/a
#1: Jul 23 '05
Any idea how i'd create a javascript which auto redirects to a
specified url every 5 seconds until the url specified is reached?

So if the url specified is redirected elsewhere it redirects to the
specified url again and again until it reaches its destination.


David Given
Guest
 
Posts: n/a
#2: Jul 23 '05

re: auto redirect every 3 seconds until redirected


mr_buggerlugs@hotmail.com wrote:[color=blue]
> Any idea how i'd create a javascript which auto redirects to a
> specified url every 5 seconds until the url specified is reached?[/color]

I don't believe you can --- as soon as the first redirection completes, your
page is no longer running.

You might be able to do something funky with iframes --- redirect the
contents of an iframe, wait until it's loaded, check to see if it's the
right one, if it is redirect the main page to the same place --- but you'd
probably run afoul of the security rules.

This sounds suspiciously like the wrong solution for a problem. What are you
actually trying to do?

--
+- David Given --McQ-+ "If Alan Turing was alive today, the homosexuality
| dg@cowlark.com | would be OK but he'd be in trouble for
| (dg@tao-group.com) | codebreaking." --- Martin Bacon
+- www.cowlark.com --+

Buggerlugz
Guest
 
Posts: n/a
#3: Jul 23 '05

re: auto redirect every 3 seconds until redirected


On Tue, 24 May 2005 09:57:28 GMT, David Given <dg@cowlark.com> wrote:
[color=blue]
>This sounds suspiciously like the wrong solution for a problem. What are you
>actually trying to do?
>[/color]
I'm attempting to gain access to a website which is limited to 1000
users at any one time. Unfortunatly for me it won't allow me access
most of the day because its always hovering around this number.

By hitting my favorites to specific urls over and over I can gain
access but it can take over 30 attempts to get in.

Ideally i'd like a way of setting a script into action and leaving it
hammering away until it allows me in.


Random
Guest
 
Posts: n/a
#4: Jul 23 '05

re: auto redirect every 3 seconds until redirected


Not going to happen. Scripts cannot know anything about any document
outside of their own domain-- not even the URL.

I'd recommend just making it easier to click the link, unless you need
to hit this site really frequently. In that case, there're a number of
possibilities, none of which involve JavaScript.



Buggerlugz wrote:[color=blue]
> On Tue, 24 May 2005 09:57:28 GMT, David Given <dg@cowlark.com> wrote:
>[color=green]
> >This sounds suspiciously like the wrong solution for a problem. What[/color][/color]
are you[color=blue][color=green]
> >actually trying to do?
> >[/color]
> I'm attempting to gain access to a website which is limited to 1000
> users at any one time. Unfortunatly for me it won't allow me access
> most of the day because its always hovering around this number.
>
> By hitting my favorites to specific urls over and over I can gain
> access but it can take over 30 attempts to get in.
>
> Ideally i'd like a way of setting a script into action and leaving it
> hammering away until it allows me in.[/color]

Buggerlugz
Guest
 
Posts: n/a
#5: Jul 23 '05

re: auto redirect every 3 seconds until redirected


On 24 May 2005 04:09:24 -0700, "Random" <randomiez@gmail.com> wrote:
[color=blue]
>Not going to happen. Scripts cannot know anything about any document
>outside of their own domain-- not even the URL.
>
>I'd recommend just making it easier to click the link, unless you need
>to hit this site really frequently. In that case, there're a number of
>possibilities, none of which involve JavaScript.[/color]

okay, i'm open to any suggestions as i do need frequent access to the
site.
Richard Cornford
Guest
 
Posts: n/a
#6: Jul 23 '05

re: auto redirect every 3 seconds until redirected


Buggerlugz wrote:
<snip>[color=blue]
> okay, i'm open to any suggestions as i do need
> frequent access to the site.[/color]

A script running in WSH and using an XMLHTTPRequest object could make
regular calls to a URL and monitor the status of the response, doing
something, like opening IE, when it gets a status 200 response. You may
be able to get away with only making HEAD requests and so not impacting
too much on your own bandwidth in the process. But don't be too
surprised if the sight operators notice you doing this and decide to
block your requests so you are not impacting on their servers/bandwidth.

Richard.


Randy Webb
Guest
 
Posts: n/a
#7: Jul 23 '05

re: auto redirect every 3 seconds until redirected


Richard Cornford wrote:
[color=blue]
> Buggerlugz wrote:
> <snip>
>[color=green]
>>okay, i'm open to any suggestions as i do need
>>frequent access to the site.[/color]
>
>
> A script running in WSH and using an XMLHTTPRequest object could make
> regular calls to a URL and monitor the status of the response, doing
> something, like opening IE, when it gets a status 200 response. You may
> be able to get away with only making HEAD requests and so not impacting
> too much on your own bandwidth in the process. But don't be too
> surprised if the sight operators notice you doing this and decide to
> block your requests so you are not impacting on their servers/bandwidth.[/color]

Not to mention that by the time IE opens, navigates to the site, and
attempts to load the site that the site may be full and IE gets rejected :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Closed Thread


Similar JavaScript / Ajax / DHTML bytes