Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/07/2012, 16:10
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: ¿Como calcular el tiempo de carga de una página web?

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>Tiempo de carga</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript">
  7. //<![CDATA[
  8. var antes = (new Date()).getTime();
  9. function tdc(){ // tiempo de carga
  10. var despues = (new Date()).getTime();
  11. var segs = (despues-antes)/1000;
  12. document.getElementById("tdc").innerHTML = "tdc: " + segs + " seg.";
  13. }
  14. //]]>
  15. </head>
  16. <body onload="tdc();">
  17.  
  18. <!-- En este div mostrás el tiempo  -->
  19. <div id="tdc"><!-- tdc --></div>
  20. </body>
  21. </html>


SAludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.