Use this simple tool to convert an image into base 64 data URIs for embedding images. If you want to convert a base 64 data URI to an image click here or scroll down.
Note: It is best if the image is optimized to the smallest file size possible before converting it to a base 64 data URI!! Here is a great online image optimization tool.
What Are Data URIs?
Data URIs are used to embed images into other files so that the image is like “immediate” data. This is known as inline images, and can be embedded many places like in your CSS,
<img src... tag, email messages, and more. Read More » »
Some websites have how long it took to execute the website near the bottom of their pages. This can be entertaining, but it also servers another important purpose. I often use it to see if one of my pages is taking too long to load or hanging. To use this simple script, place this code at the top of your script:
$time = explode (' ',microtime());
return(double) $time + $time;
$startTime = getCurTime();
And this at the bottom of your script:
$endTime = getCurTime();
echo "Time to Execute = ".number_format(($endTime - $startTime),2)." seconds";
You can change the “2″ in the
number_format() function to however many decimal places you want. Below it is set to 6. If you notice your webpage taking too long to load, but not sure what piece is holding it up, you can move the script to the middle of the script or somewhere else and try to narrow it down that way.
Below is the same script but instead of measuring the execution time for the entire page, it just calculates the time it takes to execute the content of this blog post.
Time to Execute = 0.000017 seconds