Use meta tags to disable browser caching

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Sat, 13 Aug 1983 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

The above is a simple code to disable browser caching. The http-equiv attribute attempts to communicate with the browser regarding the page.

In the above code, the expires value tells the value that its information is old and get another. The pragma tells the browser not to cache.

CakePHP 3 vs Yii 2

I love both CakePHP and Yii. I use them a lot. In fact, I always been urged to find the better framework but to no avail. However, I’ve always wanted to list the pros and cons of each framework. This is my measly attempt to create one.

CakePHP 3


* Better URL considerations on Controller and Method names * Database Migrations now an off


* Uploading files need a third party plugin * Lack on OOTB integration with Codeception

Yii 2


* Built-in File Uploading * Database Migrations * Has integration for Codeception


Difference Between update_attribute and update_attributes

There a number of ways to update a field in ActiveRecord. update_attribute and update_attributes are about the most used of them all.

Without checking any of the documentation, Update attribute and update_attributes are very similar with update_attribute being used for a single field and update_attributes for multiple fields.

But there’s a really really important difference to remember is that validations are skipped when you used update_attribute


Permissions 0640 for '/Users/you/Downloads/thepemfile.pem' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /Users/you/Downloads/thepemfile.pem
debug1: No more authentication methods to try.
Permission denied (publickey).

The above is a common error that you see when you try to connect to an amazon server using a pem file. A pem file is a security certificate. For amazon aws, it allows you to access the server.

The common fix for this is to chmod the pem file.

chmod 400 /Users/you/Downloads/thepemfile.pem

Chmoding the file to make it only readable by the owner is the key to fixing the problem.