How to know the mode the browser running with ?


How to know the mode the browser running with ? i.e. Standards Mode, Quirks Mode ...   In Firefox and Opera you can determine if your browser is in "quirks mode" by checking page info. Using document.compatMode, will tell you the mode you are in with most browsers. In Chrome, Safari, and IE, run this javascript in the address … Continue reading How to know the mode the browser running with ?

gzip compression using .htaccess


You can compress static files such as image files (.jpg, .png, ....), Flash files (.swf), Style sheets (.css), Javascript (.js) to reduce size of fetched files and make pages load faster. You can do gzip compression on these files via .htaccess file   # 480 weeks <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> Header set Cache-Control "max-age=290304000, public" </FilesMatch> # … Continue reading gzip compression using .htaccess

CakePHP: change default model for a controller


By default a CakePHP controller uses a model with singularized name, for example a controller with name Students will use by default a model named Student, But if you want or have to change the default model for a controller you can set it using $modelClass member attribute for example for a controller named ClassesController … Continue reading CakePHP: change default model for a controller