Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to tell remote that javascript is running?

0 views
Skip to first unread message

Carl A. Schreiber

unread,
Mar 31, 2005, 6:40:21 AM3/31/05
to perl-ja...@perl.org
Hi,

I want to download some html-pages that send something different if javascript
is not running. So
use LWP::Simple;
..
$got = get( $url );
does not work, because LWP::Simple does not tell the sever that javascript is
running.

Is there a solution? Right now I don't need to run the javascript code I just
want to act as it were possible.

Thanks in advance,
carl

Paul Hamingson

unread,
Apr 1, 2005, 12:21:00 PM4/1/05
to perl-ja...@perl.org
Carl,
I don't believe that it is an explicit communication that tells the
server that javascript is running, but rather the fact that the initial
page has some javascript that alters what the next request would be. The
most common thing would involve setting or altering a cookie, or using a
document.write call to alter some aspect of a form to be submitted - or
displayed.

You can use something to capture the entire conversation (like Ethereal
- http://www.ethereal.com/) while you use a regular browser to walk
through the steps if you're up for the task of walking through all the
ins and outs of tcp/ip packets, or you can use a combination of view
source along with the livehtttpheaders
(http://livehttpheaders.mozdev.org/) extension for Firefox/Mozilla.

The Webdeveloper extension for Firefox (http://webdeveloper.mozdev.org/)
also has some good tools for hypertext transfer protocol detectives. But
"View Source" is the simplest place to start.

Hope I'm not stating too much of the obvious, but your question and code
example were pretty general.

Peace,
Paul

Carl A. Schreiber wrote:

--
"If you wish to be happy yourself, you must
resign yourself to seeing others also happy."
-- Bertrand Russell

0 new messages