Edit File by line
/home/barbar84/www/wp-conte.../plugins/prevent-...
File: readme.txt
=== Prevent Browser Caching ===
[0] Fix | Delete
Tags: browser cache, clear, assets, frontend, development
[1] Fix | Delete
Requires at least: 4.0
[2] Fix | Delete
Tested up to: 5.5
[3] Fix | Delete
Stable tag: 2.3.2
[4] Fix | Delete
License: GPLv2 or later
[5] Fix | Delete
License URI: https://www.gnu.org/licenses/gpl-2.0.html
[6] Fix | Delete
[7] Fix | Delete
Updates the assets version of all CSS and JS files. Shows the latest changes on the site without asking the client to clear browser cache.
[8] Fix | Delete
[9] Fix | Delete
== Description ==
[10] Fix | Delete
[11] Fix | Delete
Are you a frontend developer? Do you want to clear browser cache for all users? Just activate this plugin and show your work!
[12] Fix | Delete
[13] Fix | Delete
Prevent Browser Caching allows you to update the assets version of all CSS and JS files automatically or manually in one click.
[14] Fix | Delete
[15] Fix | Delete
Now you can show the latest changes on the site without asking the client to clear the cache.
[16] Fix | Delete
[17] Fix | Delete
= How it works? =
[18] Fix | Delete
[19] Fix | Delete
Usually, WordPress loads assets using query param "ver" in the URL (e.g., style.css?ver=4.9.6). It allows browsers to cache these files until the parameter will not be updated.
[20] Fix | Delete
[21] Fix | Delete
To prevent caching of CSS and JS files, this plugin adds a unique number (e.g., 1526905286) to the "ver" parameter (e.g., style.css?ver=4.9.6.1526905286) for all links, loaded using wp_enqueue_style and wp_enqueue_script functions.
[22] Fix | Delete
[23] Fix | Delete
= For developers =
[24] Fix | Delete
[25] Fix | Delete
By default, this plugin updates all assets files every time a user loads a page and adds options in the admin panel (Settings -> Prevent Browser Caching) which allows you to configure updating of these files.
[26] Fix | Delete
[27] Fix | Delete
But you can also set the version of CSS and JS files programmatically.
[28] Fix | Delete
[29] Fix | Delete
Just insert this code in functions.php file of your theme and change the value of assets_version when you need to update assets:
[30] Fix | Delete
[31] Fix | Delete
`prevent_browser_caching( array(
[32] Fix | Delete
'assets_version' => '123'
[33] Fix | Delete
) );`
[34] Fix | Delete
[35] Fix | Delete
== Installation ==
[36] Fix | Delete
[37] Fix | Delete
= From WordPress dashboard =
[38] Fix | Delete
[39] Fix | Delete
1. Visit "Plugins > Add New".
[40] Fix | Delete
2. Search for "Prevent Browser Caching".
[41] Fix | Delete
3. Install and activate Prevent Browser Caching plugin.
[42] Fix | Delete
[43] Fix | Delete
= From WordPress.org site =
[44] Fix | Delete
[45] Fix | Delete
1. Download Prevent Browser Caching plugin.
[46] Fix | Delete
2. Upload the "prevent-browser-caching" directory to your "/wp-content/plugins/" directory.
[47] Fix | Delete
3. Activate Prevent Browser Caching on your Plugins page.
[48] Fix | Delete
[49] Fix | Delete
== Changelog ==
[50] Fix | Delete
[51] Fix | Delete
= 2.3.2 =
[52] Fix | Delete
* Fixed "Update CSS/JS" button in the admin bar.
[53] Fix | Delete
[54] Fix | Delete
= 2.3.1 =
[55] Fix | Delete
* Tested the plugin in WordPress 5.1.
[56] Fix | Delete
[57] Fix | Delete
= 2.3 =
[58] Fix | Delete
* Tested the plugin in WordPress 5.0-beta1 and optimized the code.
[59] Fix | Delete
[60] Fix | Delete
= 2.2 =
[61] Fix | Delete
* Added function "prevent_browser_caching" which disables all admin settings of this plugin and allows to set the new settings.
[62] Fix | Delete
* Changing "ver" param instead of adding additional "time" param.
[63] Fix | Delete
[64] Fix | Delete
= 2.1 =
[65] Fix | Delete
* Added option to show "Update CSS/JS" button on the toolbar.
[66] Fix | Delete
[67] Fix | Delete
= 2.0 =
[68] Fix | Delete
* Added setting page to the admin panel.
[69] Fix | Delete
* Added automatically updating CSS and JS files every period for individual user
[70] Fix | Delete
* Added manually updating CSS and JS files for all site visitors
[71] Fix | Delete
[72] Fix | Delete
= 1.1 =
[73] Fix | Delete
* Added plugin text domain.
[74] Fix | Delete
[75] Fix | Delete
= 1.0 =
[76] Fix | Delete
* First version of Prevent Browser Caching plugin.
[77] Fix | Delete
[78] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function