Google Answers Logo
View Question
 
Q: Slow loading of web pages generated from CGI scripts with Netscape 4.7 ( No Answer,   0 Comments )
Question  
Subject: Slow loading of web pages generated from CGI scripts with Netscape 4.7
Category: Computers > Programming
Asked by: jazzbass-ga
List Price: $50.00
Posted: 09 Apr 2003 18:53 PDT
Expires: 16 Apr 2003 09:19 PDT
Question ID: 188557
I'm processing form input on a web site that uses Perl CGI scripts
running under IIS 5 on W2K. The performance is fine using IE and
Netscape 7, but with Netscape 4.76 it takes 30 seconds to download a
simple page. I'm not setting any strange headers, and if I copy the
page source into a text file and open the file with Netscape 4.76, it
opens instantly. What could be slowing this down?

Request for Question Clarification by maniac-ga on 09 Apr 2003 19:06 PDT
Hello Jazzbass,

Do you have an URL to view the form (and/or the text version)?

Thanks
  --Maniac

Request for Question Clarification by joseleon-ga on 10 Apr 2003 01:46 PDT
Hello:
  Are you generating a complex HTML page with a lot of tables, CSS and
so on? NS 4 rendering engine is not very fast and could delay a lot
showing some pages. As maniac requests, please, post an URL and we
could try to solve your problem.

Clarification of Question by jazzbass-ga on 10 Apr 2003 09:52 PDT
The problem seems to be caused by a redirection request. For example,
a login page sends the user's password to a Perl script that contains
the following statements:

  $query = new CGI;
  ...
  print $query->redirect(-uri=>"http://myhost/temp.html") 
      if ($pass eq $pwd);

This outputs the following http response:

  HTTP/1.0 302 Moved
  Location: http://myhost/temp.html

I've tried the redirect with "-nph=>1" but Netscape 4 is still very
slow.

The page loads instantly if I point Netscape 4 directly at
http://myhost/temp.html or if the url is the target of a link (<a
href="http://myhost/temp.html">), so the redirection seems to be the
problem. How can I speed this up?

Thanks,
Mike

Request for Question Clarification by maniac-ga on 10 Apr 2003 10:55 PDT
Hello Jazzbazz,

I hate to ask again, but do you have an example we can access to help
diagnose the problem?

For example, I'm currently using Netscape 4.76 to post this request,
and can monitor both CPU time and network traffic (to help determine
the sequence of events and which step is slow). Without an example, I
can only guess at the cause. I can also add to joseleon's comment that
Javascript can also slow down Netscape 4.76 significantly as well.

  --Maniac

Clarification of Question by jazzbass-ga on 10 Apr 2003 12:55 PDT
Unfortunately, I can't modify the public site, and my test system is
not publicly accessible. But I am open to guesses. :-)

After more tests, it seems that a hyperlink with an href pointing to
the Perl script works fine, but a form action referencing the same url
is slow. The following files duplicate the problem on my system:

hello.html:
  <html>
  <body>
      <a href="http://myhost/cgi-bin/temp.plx"><h2>Very fast</h2></a>
      <form method="POST" action="http://myhost/cgi-bin/temp.plx">
          <input type="submit" value="Very slow">
      </form>
  </body>
  </html>
  
cgi-bin/temp.plx:
  use CGI;
  print new CGI->redirect(-uri=>"http://myhost/temp.html", -nph=>1);
  
temp.html:
  <html>
  <body>
  <h2>Loads quickly from the hyperlink, slowly from the submit
button</h2>
  </body>
  </html>

Request for Question Clarification by errol-ga on 16 Apr 2003 08:12 PDT
Hello there, Jazzbass.

Would you consider a Meta Refresh as an acceptable way to re-direct?
As far as I know, the majority of browsers are capable of using this
method and I can check compatibility with the World Wide Web
Consortium if you would like me to.

Regards,
errol-ga.

Clarification of Question by jazzbass-ga on 16 Apr 2003 09:19 PDT
In my application, a Meta Refresh won't work because the redirection
requires a run-time decision in a Perl script:

  if (valid user)
     redirect to input form
  else
     redirect to login page

Thanks,
Mike
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy