How to prevent Browser from caching JavaScript file

Sometimes, JavaScript modification doesn’t reflect on the page while running the need to clear browser cache manually each time when the file gets updated.

It makes the debugging process hard.

If the project contains some bug and you fix it but the user needs to clear the browser cache to reflect the changes.

In this tutorial, I show how you can prevent JavaScript file from Caching by the browser.

How to prevent Browser from caching JavaScript file

Read more

Integrate CKEditor to HTML page and save to MySQL with PHP

CKEditor is a WYSIWYG HTML editor.

It makes HTML textarea lot more user-friendly by providing various features like – adding images, writing HTML code, formatting text, etc.

This can also be added to HTML containers.

It does not depend on other libraries like – jQuery and can be used in 3 different modes – Article Editor, Document Editor, and Inline Editor.

Different options are available to customize the editor.

In this tutorial, I am adding Article and Inline mode CKEditor on the same page and save it to MySQL database on submit with PHP.

Integrate CKEditor to HTML page and save to MySQL with PHP

Read more

Drag and Drop file upload with Dropzone in CodeIgniter 3

Dropzone is a JavaScript library that allows uploading file by drag’n’drop and displays the file preview after upload.

It is easier to add to the page and it does not depend on any library like jQuery.

The file will upload to the server via AJAX.

In this tutorial, I show how you can use the Dropzone library to upload the file in CodeIgniter 3.

Drag and Drop file upload with Dropzone in CodeIgniter 3

Read more