{"id":100492,"date":"2019-03-29T04:45:07","date_gmt":"2019-03-29T04:45:07","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/disable-version-caching\/"},"modified":"2020-11-30T06:45:45","modified_gmt":"2020-11-30T06:45:45","slug":"disable-version-caching","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/disable-version-caching\/","author":14339628,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"trunk","tested":"5.5.18","requires":"4.0","requires_php":"","requires_plugins":"","header_name":"Disable Version Caching","header_author":"Aman Khanakia","header_description":"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.","assets_banners_color":"","last_updated":"2020-11-30 06:45:45","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/wordpress.org\/support\/users\/mrkhanakia\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":3683,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":3},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":2356170,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[7626,5757,13248,734,2250],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-100492","plugin","type-plugin","status-publish","hentry","plugin_tags-assets","plugin_tags-browser-cache","plugin_tags-clear","plugin_tags-development","plugin_tags-frontend","plugin_committers-mrkhanakia"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/disable-version-caching\/assets\/icon-256x256.png?rev=2356170","icon_2x":"https:\/\/ps.w.org\/disable-version-caching\/assets\/icon-256x256.png?rev=2356170","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Are you a frontend developer? Do you want to clear browser cache for all users? Just activate this plugin and show your work!<\/p>\n\n<p>Disable Version Caching allows you to update the assets version of all CSS and JS files automatically or manually in one click.<\/p>\n\n<p>Now you can show the latest changes on the site without asking the client to clear the cache.<\/p>\n\n<h4>How it works?<\/h4>\n\n<p>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.<\/p>\n\n<p>To prevent caching of CSS and JS files, this plugin adds a unique number (e.g., 1526903434) to the \"ver\" parameter (e.g., style.css?ver=4.9.6.1526903434) for all links, loaded using wp_enqueue_style and wp_enqueue_script functions.<\/p>\n\n<h4>For developers<\/h4>\n\n<p>By default, this plugin updates all assets files every time a user loads a page and adds options in the admin panel (Settings -&gt; Disable Version Caching) which allows you to configure updating of these files.<\/p>\n\n<p>But you can also set the version of CSS and JS files programmatically.<\/p>\n\n<p>Just insert this code in functions.php file of your theme and change the value of assets_version when you need to update assets:<\/p>\n\n<pre><code>disable_version_caching( array( \n    'assets_version' =&gt; '123' \n) );\n<\/code><\/pre>\n\n<!--section=installation-->\n<h4>From WordPress dashboard<\/h4>\n\n<ol>\n<li>Visit \"Plugins &gt; Add New\".<\/li>\n<li>Search for \"Disable Version Caching\".<\/li>\n<li>Install and activate Disable Version Caching plugin.<\/li>\n<\/ol>\n\n<h4>From WordPress.org site<\/h4>\n\n<ol>\n<li>Download Disable Version Caching plugin.<\/li>\n<li>Upload the \"disable-version-caching\" directory to your \"\/wp-content\/plugins\/\" directory.<\/li>\n<li>Activate Disable Version Caching on your Plugins page.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>First version of Disable Version Caching plugin.<\/li>\n<\/ul>","raw_excerpt":"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.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/100492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=100492"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mrkhanakia"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=100492"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=100492"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=100492"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=100492"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=100492"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=100492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}