How to disable browser cache in CakePHP


use the useful callback disableCache(), that will tell the user’s browser not to cache the results of the current request. This is different than view caching. The headers sent to this effect are: Expires: Mon, 26 Jul 1997 05:00:00 GMT Last-Modified: [current datetime] GMT Cache-Control: no-store, no-cache, must-revalidate Cache-Control: post-check=0, pre-check=0 Pragma: no-cache

How to check a not defined variable in javascript


In JavaScript null is an object. There's another value for things that don't exist, undefined. The DOM returns null for almost all cases where it fails to find some structure in the document, but in JavaScript itself undefined is the value used. To check for null  if (null == yourvar) // with casting if (null … Continue reading How to check a not defined variable in javascript

are these functions identical


Let's see this question: //Assume function example1(){ echo 'example 1'; } //,and function example2(){ echo 'example 2'; } //True or False var_dump( ( example1() ==  example2() ) ); This will result to TRUE, but why? cause both functions example1() and example2() doesn't  return anything (doesn't have a return statement) so it is called (void) function … Continue reading are these functions identical