<? Header("content-type: application/x-javascript"); sleep(2); // Setting Var for Safari 2 to check when script is loaded ??> var d1 = true;
This is the most common way of including Javascript files in a page:
<head> <title>Loading scripts in header normally</title> <script type="text/javascript"> var start= new Date(); </script> <script type="text/javascript" src="delay1.php"></script> <script type="text/javascript" src="delay2.php"></script> <script type="text/javascript" src="delay3.php"></script> <script type="text/javascript" src="delay4.php"></script> <script type="text/javascript" src="delay5.php"></script> <script type="text/javascript"> var end= new Date(); alert(((end - start) / 1000) + 'seconds'); </script> </head>
The file can be viewed and test here. As Stoyan points out loading scripts in the header blocks everything else on the page, including other scripts. So ...
Full entry and comments
When building sites often image mouseovers or rollovers are needed, while there are many ways to go about adding in this functionality all of them required more steps than ideal. At the very least you’d have to specify the over state image to use and attach some some javascript to the mouseover and mouseout events. To streamline this process I created this mouseover script, an example of it in action is to the right.
To enable the mouseover just include the required javascript files and then for any image that should have the mouseover apply the css class of “jp-mouseover”. For the over state image it will look for the image name with “_ov” appended just before the the file extension. For the example to the right the two images are named “mouse-over-me.png” and “mouse-over-me_ov.png”.
Details, examples, downloads, and configuration options are here.
Full entry and commentsThis week I setup Django on a slicehost slice using Ubuntu Hardy for the OS, Postgresql for the db, Apache for serving the django app, and Nginx for serving the media and proxying to apache. For my future reference and hopefully to help out others here is the process I went through.
Slicehost has some easy to follow and straight forward articles to start I just followed along with the articles.
Start with the Ubuntu Hardy setup - page 1. You can follow this guide straight through. The only complicated part is when you do the “visudo” command ...
Full entry and comments