in reply to Re^7: Executing Javascript from HTML pages in perl
in thread Executing Javascript from HTML pages in perl

<html> <head> <script> document.location.href="http://www.perlmonks.org"; </script> </head> <body> This site has moved. You will be redirected shortly. </body> </html>

How would LWP know to redirect without executing the javascript?

Speaking of CSS, my personal website ain't too shabby either ;)

Replies are listed 'Best First'.
Re: Re: Re^7: Executing Javascript from HTML pages in perl
by Mr. Muskrat (Canon) on Nov 07, 2002 at 17:29 UTC

    Anyone who uses javascript to redirect instead of the META refresh tag should be shot.

      While true, that doesn't stop people from doing it. Heres perhaps a better example:

      <html> <head> <script> if (document.all) //IE4,5 loc = 'index-ie4-5.html' else if (document.layers) //NS4 loc = 'index-ns4.html' else if (document.getElementById) //new browser loc = 'index.html' document.location.href = loc; </script> </head> <body> This site has moved. You will be redirected shortly. </body> </html>

      How would an LWP script handle this?

        It wouldn't but the person writing the script would...