How can I leverage browser cache for minified JS or minified CS files?

Yeah, you can do leverage browser caching for minified js & css files same as we do for other files. <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg “access 1 year” ExpiresByType image/jpeg “access 1 year” ExpiresByType image/gif “access 1 year” ExpiresByType image/png “access 1 year” ExpiresByType text/css “access 1 month” ExpiresByType text/html “access 1 month” ExpiresByType … Read more

WP REST API and Access-Control-Allow-Origin

I found a .htaccess solution, but I will be happy if anyone know a working PHP solution. It’s my .htaccess with multiple domain access support and access for only GET request: # CORS Headers <ifModule mod_headers.c> SetEnvIf Origin “^http(s)?://(.+\.)?(localhost:8080|example\.com|example\.net)$” origin_is=$0 Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is Header always set Access-Control-Allow-Methods “GET” Header always set Access-Control-Allow-Headers … Read more

Is WordPress cache shared for all blogs in a multisite network?

It depends. In general object cache (at least the APCu and memcache based) is global, and is global to the whole server, so the question can be rephrased to “Which caching keys are being prefixed/postfixed with unique strings based on the sub-site”. The answer, as can be seen in https://developer.wordpress.org/reference/classes/wp_object_cache/set/ is that wordpress core adds … Read more

How can I control if post updated

add below action in your main function file of your plugin add_action( ‘wp_insert_post’, ‘my_project_updated_post’, 10, 3 ); function my_project_updated_post( $post_id, $post, $update ) { // your code goes here // Every time you will get updated or newly created post id here. }

WordPress website not showing changes without clearing cache

If the files are being cached, then whatever caching solution you are using is working! That’s why there’s a clear caching button available. Typically JS and CSS files will be cached. While you are in development I recommend changing the version of the file being cached. This can be done by updating the wp_enqueue_script (js … Read more

How do I clear Chrome’s SSL cache?

Chrome stores SSL certificate state per host in browser history. So just clear browser history (Ctrl+Shift+Del), at least the following parts: Cached images and files Hosted app data Content licenses Cookies and other site data, for Chrome version 64 Solution 2. If the above doesn’t help, try this: Close Chrome, kill all chrome background processes … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)