Apparently if(console) is not enough and can cause an error in some versions of Firebug.
The solution is:
if(
navigator.appName == "Netscape" &&
window.console !== undefined &&
window.console !== null
)
Tuesday, September 28, 2010
Friday, March 6, 2009
Don't forget to FLUSH!
JSP:
<% response.flushBuffer(); %>
PHP:
<?php flush(); ?>
Ruby:
$stdout.flush
ASP:
Python:
sys.stdout.flush()
<% response.flushBuffer(); %>
PHP:
<?php flush(); ?>
Ruby:
$stdout.flush
ASP:
Response.Flush
If you use this, don't forget to set Response.Buffer = TruePython:
sys.stdout.flush()
Saturday, October 11, 2008
Most important tricks
Performance distribution: Backend ~20% and Frontend ~80%
1. Make fewer HTTP requests. (Combine CSS and JS into single files)
2. Put CSS at the top of the page. (right after <HEAD>)
3. Put JS at the bottom. (right before </BODY>)
4. Use external CSS and JS. (is better due to caching)
5. Minify JS (avoid Obfuscation unless really necessary)
6. Cache AJAX responses (best example: Gameknot tooltip for any username)
1. Make fewer HTTP requests. (Combine CSS and JS into single files)
2. Put CSS at the top of the page. (right after <HEAD>)
3. Put JS at the bottom. (right before </BODY>)
4. Use external CSS and JS. (is better due to caching)
5. Minify JS (avoid Obfuscation unless really necessary)
6. Cache AJAX responses (best example: Gameknot tooltip for any username)
Wednesday, October 1, 2008
Web Application Tricks
I've started reading some very interesting programming books and I found that, even though the content was awesome and I learned a lot more from these books than from years of programming hands-on experience, it was hard to go back and find a particular solution when needed. So I decided to compile my own list of Tricks and Tips so that I can easily find them when I need them the most.
Almost all of the tricks and tips here are extracted from one of the books listed on the left, but I will not specify which tip came from which book. I will also not copy/paste their content but rather create my own descriptions and titles. Furthermore, the tricks and tips in this list are just a tiny subset of everything found in these books. Thus, if you really want to learn something, you should consider purchasing these books at some point and maybe compiling a list of your own. I purchased all of them and I would have been sorry if i didn't.
This Blog is a part of the Tricks Series:
Almost all of the tricks and tips here are extracted from one of the books listed on the left, but I will not specify which tip came from which book. I will also not copy/paste their content but rather create my own descriptions and titles. Furthermore, the tricks and tips in this list are just a tiny subset of everything found in these books. Thus, if you really want to learn something, you should consider purchasing these books at some point and maybe compiling a list of your own. I purchased all of them and I would have been sorry if i didn't.
This Blog is a part of the Tricks Series:
Subscribe to:
Posts (Atom)