remove cookies when i need from visitors wordpress - wordpress

I used wordpress and w3 total cache when i install this plugin to make my site more faster and everything good but if i try to edit any Cascading Style Sheet or JavaScript files i must delete cookies and cache to results of this edit appear.
What can i do to solve this problem ? If i try to make any changes this changes will not be appear to users, Their must be waited at lest month to view this changes.
Because that i need anything to delete cookies of users when i need to do it.
Thanks

What you are looking for is a technique called cache busting. Essentially what it is, is that your server and cache is working together and find a file on the server and in the cache with the same name. If your css/js would change name efter every edit a new css/js name would appear and thus a new request has to be made. That's cache busting you ya.
Read more about it here! https://gilbert.pellegrom.me/cache-busting-wordpress-style-css/

Related

Wordpress: pages are not updating despite emptying caches

I have used the plugin All-in-One WP Migration to get the site from the development environment to the live site (you can export and import a complete website).
Some pages have updated correctly but not all of the pages (they remain in the old style and structure).
I have deleted my browser cache several times (tried several browsers on different computers even), deleted caches created by plugins several times (tried deactivating those plugins as well). However, despite trying to delete all the caches I can think of, some pages are just not updating. As the page templates for these pages do not exist anymore on the server, I am at a complete loss as to what's preventing all the pages from updating correctly.
What am I missing?
May I ask is your site already live? Cause I had the same issue as yours and I manage to get it updated by deleting the cache by "Flush Cache" on my WordPress admin page
Once you logged in to your WordPress admin site you'll find this and click that
Flush Cache
Flush Cache (2)
I am not so sure why that happens but I am thinking it might be because from the server and might need sometime on updating any changes made. It happened to me also when I have some updates on my site then once I save everything and go to my site, still the old ones are being shown but when I Flush Cache then it shows up the new ones... I think the reason because it still shows up the old ones is probably of the cache from the old ones in the server and by flushing them is being able to show the updated ones.

WordPress styling does not display without clearing cache

I am building a WordPress website with an Underscore theme, it is hosted on flywheel. Everytime I make changes to a page, the styling style.css file is not picked up unless I do a hard reload/ clear cache.
Obviously I want it to load on everyone's computer immediately without the need to clear the cache. What is the reason for this? and how can I resolve it?
thanks.
You must change your theme version every time you make change in your style.css file. version will be appended to the URL as the query string. A version identifier is used to cache-bust the URL. The browser will detect the URL – with the query string – as a new and updated file rather than a cached resource.
see WordPress Theme CSS and JS Cache Busting

Does W3 Total Cache modify original css/js

I am looking to get w3 total cache going on my wordpress install.
I've done some searching, but I can't find out if the minification feature actually removes all the white space from your original css & js when you opt in for that.
I don't want to have all the white space removed, then need to make a change and have no readable code.
So ultimately I need to know whether I always have to keep my original somewhere else as another backup before turning this thing on.
Also, when you update something on your site, does w3 total cache rebuild the cache so the new post will appear on the home page for example.
Thanks for your input.
Well the way w3 total cache works is that it creates a cache folder in your wp-content. So after a few minutes it re-compiles all the css and js files and keep them in the cache folder. The website then directly links to these cached files, instead of your custom files.
In short it does not modify any existing files, it just creates new cached files. And when ever you make changes to your css/js, you just have to flush the cache and it will delete the previous cached files and create a new batch of cached files.
But your css/js files have to be enqueued, so this will let w3 total cache know which files it needs to minify and in which order. If you are using a wordpress theme then by default it should have all the enqueues in place.

Wordpress css won't change unless I edit cache/combined.css

I've made changes to some css but they don't go into effect. I have to edit a file in cache/combined.css. Did wordpress create this file?
Yes.
It is part of a caching system to speed up to Wordpress site to run faster. You probably have a caching plugin enabled and what you would need to do is use the feature of that plugin (if there is one) to clear the cache.
Alternatively, you could just delete that file out of cache and it should re-cache the new file on next page load.

enable a drupal theme manually (which file to modify)

Ok, let's say i'm a big newby on drupal, and that i want to load a theme (which actually should be enabled, and displaying - currently not). And that i don't have access to the admin part of the install (old site, etc… don't ask why).
Looking for someone to specify me the files to change in order to make this theme work.
Thanks
(We could talk about clearing the cache "manually" too… hate sometimes those all-in-the-admin stuffs, but well…)
To enable a theme 'manually' you'll need to visit the system table in your database and set the status column to 1 for the record with a type of 'theme' and a name matching the theme you want to enable.
Manually flushing caches is as simple as running a DELETE FROM table for all tables whose name begins with cache (e.g. cache, cache_block, cache_content, etc.).
None of what you're trying to find is located in files, almost all of Drupal's config is held in the database (those in settings.php excluded).

Resources