martes, 2 de septiembre de 2008
Browsers Memory
Primero tengo que decir que descarges el Google Chrome Browser (http://www.google.com/chrome)
En este ejemplo todos los navegadores abrieron 4 tabs (las mismas tabs cada uno):

Opera 9.51 resulta ser el mejor y MSIE 8 el peor.
Olvide actualizar a Opera 9.52 pero estoy seguro que son los mismos resultados.
martes, 2 de septiembre de 2008
Disculpa, esta entrada solo esta disponible en English.
lunes, 1 de septiembre de 2008
CSS and MSIE
MSIE (Microsoft Internet Explorer) CSS Hack:
.somediv {
height: 15px; /* all browsers */
#height: 20px; /* all IE Browser */
_height: 25px; /* only IE6 Browser */
}
MSIE usa comentarios condicionales: (http://msdn.microsoft.com/en-us/library/ms537512.aspx)
<!--[if IE 6]>
<script src="js/iefix.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/iefix.css" type="text/css"></style>
<div> some html code </div>
<![endif]-->
En este ejemplo si se usa IE6 agrega este codigo:
<script src="js/iefix.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/iefix.css" type="text/css"></style>
<div> some html code </div>
Para los navegadores viejos (MSIE) soporta :hover, :active y :focus:
http://www.xs4all.nl/~peterned/csshover.html
<style type="text/css">
body {
behavior:url("csshover.htc");
}
</style>
Hacer que MSIE sea compatible con los estándares. Arregla algunos detalles del HTML y CSS y hace PNG transparentes funciona correctamente en IE5 y IE6 http://code.google.com/p/ie7-js/
miércoles, 27 de agosto de 2008
domingo, 24 de agosto de 2008
JSC JavaScript Collection
Necesitamos jsmin y gzip, compilamos el jsmin.c:
Script que genera una coleccion de todos los javascripts:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| #!/bin/bash
echo "JavaScript Collection"
EXPECTED_ARGS=1
E_BADARGS=65
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: `basename $0` {path of the javascripts}"
exit $E_BADARGS
fi
# Join the javascript scripts in one file
cat $1/*.js >> $1/.__fullscripts.tmp
# use JSMIN to minifier the script
cat $1/.__fullscripts.tmp | jsmin > $1/.__fullscripts.min.tmp
# awk remove the first blank line, gzip compress the script
awk 'FNR>1{print}' $1/.__fullscripts.min.tmp | gzip > $1/collection_scripts.js.gz
# remove temporal files
rm $1/.__fullscripts.tmp $1/.__fullscripts.min.tmp |
Modo de uso: jsc public_html/web/js/
Ahora creamos un script de php que remplazara a los javascripts:
<script type="text/javascript" src="collection_scripts.php"></script>
Contenido de collection_scripts.php:
<?php
header("Content-type: text/javascript; charset: UTF-8?");
header("Content-Encoding: gzip");
readfile("collection_scripts.js.gz");
?>
Recent Comments