I would like to ask, how can I write the code of a web page in html so that the script runs simultaneously with the page loading?

  • Script on the client or server? Under IIS and IE, this (perlasp on the server and perlscript on the client) could be done in the last millennium. Well, pearl barley cgi-scripts are generally classics of the 90s genre. - alexlz

2 answers 2

For example, make a script call by loading a picture <img src="http://domain.ru/scrip.pl"/> or as a call to javascript <script src="http://domain.ru/scrip.pl"></script> , or at worst as iframe < iframe src="http://domain.ru/scrip.pl"></iframe> , fields to make the iframe invisible - google, I do not remember.

    Depending on what this script should do: If it displays some textual information inside the page, then you can use SSI ( learn more about SSI in apache ), for example:

     <!--#include virtual="/cgi-bin/script.cgi" --> 

    SSI restriction - only within one server.

    If this is some external resource, such as a picture, then in HTML:

     <img src="/cgi-bin/script.cgi" /> 

    But in this case, this resource will be requested only by a “normal” browser that loads pictures and robots (google, yandex) this script will not be pulled.