�
�
â–ª â–ª2017-08-16 14:16:45
Google Chrome
â–ª â–ª, 2017-08-16 14:16:45

Very long site update on Chrome?

I noticed a long time ago that any change with the site apart from the control panel, when working directly with the code, updates the page for a very long time (about two days) when the updated data is loaded. This problem is only with Chrome browser. Although if you delete your browsing history, everything is ok. Is there a way to make it so that any code changes (not in the control panel) will update the pages as quickly as in other browsers?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2017-08-16
@ananas_roma

ctrl+shift+f5

D
Denis Yanchevsky, 2017-08-16
@deniscopro

As far as I understand, the question is about css and js files.
You can change the version of the file after the changes, then it will be updated in the browser cache.
or do it automatically by adding wrappers and including files using them

function enqueue_versioned_script( $handle, $src = false, $deps = array(), $in_footer = false ) {
  wp_enqueue_script( $handle, get_stylesheet_directory_uri() . $src, $deps, filemtime( get_stylesheet_directory() . $src ), $in_footer );
}
 
function enqueue_versioned_style( $handle, $src = false, $deps = array(), $media = 'all' ) {
  wp_enqueue_style( $handle, get_stylesheet_directory_uri() . $src, $deps = array(), filemtime( get_stylesheet_directory() . $src ), $media );
}

Read more: How to force update js and css files in WordPr...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question