Hello,
I am going to show you how to speed up delivery of you external .js files along with examples. I will use the prototype and scriptaculous javascript libraries as a benchmark which contains 8 seperate .js files.
Unoptimized .JS
Here are the results using YSlow to benchmark the speed of the JS files downloading when there is no gzip compression, no cdn, and no minification of the js code:
Response Time (ms): 4477 (all files)
File Size (kb): 248.7
4.4 seconds to download some JS files! Thats 4.4 seconds, on broadband, to wait before the page even renders!!! So lets get that optimized.
Option 1 - Optimized .JS - Using Google
http://code.google.com/apis/ajaxlibs/documentation/index.html
This is a very quick and easy way to speed up the delivery of the library files to an acceptable level. The same files, gziped with cdn (not minimized, but gzip kind of makes up for that loss)... results in the following:
Response Time (ms): 1920 (all files)
File Size (kb)... View In Full
Recently AJAX has had a lot of hype about how it is used in the whole Web 2.0 scene. But which the great power that AJAX brings to a website, it has the capability to either destroy your site, or turn it in to something to admire!
The uses of AJAX
AJAX should be used to do one or more of the following:
Speed up delivery of content
Since only the portion of the page that is of interest needs to be loaded it means only a couple of kilobytes needs to be downloaded, instead of the whole page.
Reduce server stress
Because only a section of a page that is of interest is loaded on demand. Fewer SQL queries and fewer server side resources are required to produce just a section of a page, instead of the whole page.
Wow effect
If used with special effects (mainly when loading), it can produce a very nice looking website that has a wow effect to it!
Applications
It can be used to create application like websites! Take a look at sites such as Meebo.com for an example of a we... View In Full
Hi ya guys,
Have you ever heard of "null byte" poison? Well if not... read on...
How to create a null byte
Hold down Ctrl + Shift and press the key with the @ symbol on it. In notepad++ for example it creates a little box with the word "nul" in it. That is a null byte.
What is a null byte
It's the first character in the ascii table i.e. 0 or chr(0) for example would return a null byte (in php).
Practical Purpose
A null byte in many languages is used to detect the end of a string. As opposed to storing an integer value in the first byte or two of the string stating the total length. A null byte on the other hand would just be placed at the end of the string... in just a single byte (saving space and does not need to keep count of the total characters in a string).
PHP, C, and many other languages use null bytes to indicate the end of a string.
So whats "null byte" poison?
It's when someone enters a string and places a null byte somewhere in it. This then ch... View In Full
Browsers don't natively support mexlength on textarea tags. However this enforces maxlength='' attribute on textareas, not just input text. Also, if javascript has been disable it will simply take no
This image will not be cached by the browsers and will load with every page hit. Usefull for statistics etc on other websites that you do not own. Search engines will also tend not to load the image (
Nothing special. No AJAX has been used to actually save the to do lists. Instead you enter a new item, and the item is instantly added to the bottom of an ordered list and the new entry is highlighted
hey scott! Im on cp on my phone and it works like a dream. Just thought id let you know, so how are ya mate? Your never on msn anymore :( lol talk to you soon pal
Well it's different from other languages. Variables are created like this:
(define PI 3.1415)
But the thing with that is that PI will forever be bound to the value 3.1415. That is, I cannot change its value ever. In a pure functional language, all variables are immutable. That is you would never see something like this PHP code
$foo = 5
$foo = $baz.
I'm actually lieing a bit. Scheme does let you change a variable's value, but only because it's not a pure functional language. I'm treating as if it were one, so I don't use that functionality.
As for calling standard libraries, I'm sure you can, I just don't know how. I'm still really new at Scheme. If you're curious, you can ask closure. He knows the language quite well.
That's true. Scheme is just hard to understand because it's a completely different way of thinking about programming, than something like Java or C.
Once you get the hang of it, it's actually really easy to read. Essentially there is one type of code, functions. And they all follow the same format:
(+ 2 3) --> 5
(function a b) --> calls function with params a and b.
So everything (minus a few exceptions) follow that pattern. It makes it much easier to read code, once you have that in mind.