Home » Archive

Articles tagged with: Javascript

Uncategorized »

[21 Jul 2009 | View Comments | 13 views]

I am going to post very handy tip for javascript and css files caching. Browsers automatically cache the css and JS files and when you make change to CSS and JS some times change does not appears.
To prevent this use following
<?php
echo ‘<link rel=”stylesheet” type=”text/css” href=”style.css?’ . filemtime(’style.css’) . ‘” />’;
?>
And For JS
<?php
echo ‘<script type=”application/javascript”=”main.js?’ . filemtime(’main.js’) . ‘” />’;
?>
The PHP function filemtime returns last modified date of file, so every time you make change in css / JS files the filemtime will return different value and CSS / JS Url …

Javascript, Linux, PHP »

[25 May 2009 | View Comments | 16 views]
jQuery and Me…

I use mootools for all JS related tasks. Mootools is good library but has very limited support and few plugin available on net (most of you are not agree of this but it’s my openion based on 2 year exp with mootools) .
So I decided to move on to another framework. There is many JS toolkits available.
Dojo
jQuery
Prototype
YUI
etc.. much much more
But these are key players. I selected jQuery among these frameworks.. Why? because It has gr8 support good community and top of all, has rich plug-in directory.
To go through jQuery I …