I've recently transferred a wordpress website from http to https. After this transition the website stopped loading properly when not logged in, but it loads fine when logged in. While investigating further I also discovered that this only occurred on certain pages of the site.
So I looked for some solutions to the problem and tried disabling a few plugins. But I discovered that when I make a change (for example disabling a plugin or changing the layout) the change only appears if I am logged in, and doesn't show at all if I am logged out and viewing the site.
I have tried clearing the cache on the website disabling and re-enabling all plugins but nothing has worked.
This is how the site looks when logged in:
https://i.stack.imgur.com/YB0KO.png
And you can see how the site looks while logged out here: www.onlyphysics.org
The theme I am using is Divi.
I would be very grateful for any help I could get on this issue!
I can see that CSS files are not being loaded (404 in console). This relates to css static cache. Browser is still looking for the old css generated file.
Go to Divi Theme Options > Builder > Advanced > Static CSS File Generation
And also open your site in Incognito or private window afterwards to see. There might also be additional caching on your site, which you'll need to empty afterwards to.
More info / Source: https://divitheme.net/clear-divi-cache/
I have a localhost instance I run on a given port, and when developing a site for another client, my previous clients favicon still shows in the tab even though the client has no favicon. How do I remove my previous client's favicon from the browser/server? It does it Safari, Chrome (OS X), and Firefox. I've tried the force refresh (Mac equivalent of Ctrl + F5) to no avail. Any help would be appreciated.
Thanks.
Clear the browser's cache: Ctrl-Shift-Delete (Cmd-Shift-Delete), select what to clear, and for what period of time. Because the new website has the same host as the old one, browser may still think you're on the previous site and display your cached icon.
Or just add a favicon to the new site.
You can force a browser to download new instances of similarly named files by adding a version to them in the form of a query parameter, and updating the version as needed throughout development.
<link rel="icon" href="localhost:4200/favicon.ico?version=2" />
Other than that, closing the tab, and in some cases restarting the browser works if force refreshing the cache didn't.
These are typically stored in with the temp internet files on your server. Clearing the history, cookies, and meta-data should take care of this.
Hi I'm kinda stuck on idea's to try to solve my problem since I don't have much experience concerning caches.
I'm currently working on this site of a business partner of me.
I got his host, username and password so I'm litterary working as him using Filezilla.
I downloaded the entire site content from filezilla into a desktopfolder.
I made a copy of it to work in and from there I made some changes in the .html and .css files.
In offline mode, everythings works perfectly as I want it.
Then I deleted the the sitecontent in Filezilla and replaced it with my changes.
Now the weird parts happen.
When I open the site online without www. prefix it works great
when I open the site online with www. prefix I can't see the images that are
placed within div's that purely concern the image
When a pc opened the site in the first 3 houres it was online, the div's don't
work
Also later on that specific pc can't make the div's to work
Pc's that opened the site only after these 3 houres have no problem at all
I've tried replacing the stylesheet and wait a couple hours, but caches seem to be made. and the result stays the same.
However this is no problem for the avarage customer since for them the site works, you can see what a hell this may be for me as developer and the owner, who offcourse opened the site right after I put it online.
Any suggestions might be usefull.
In most of the browsers you can use F12 shortcut to see the developer tools. In Network tab you can see all files that are currently being loaded. You can see there if the file is being loaded from the server or from the local machine.
By pressing CTRL+F5 (in Chrome and think in Firefox too) you are forcing cache to refresh.
If the PC is still loading in a cached version of the site, you can refresh the page and delete the cache by holding Control + F5.
Seems like I found the source of the problem.
I was using the css from a bought template which has some coding that malfunctions when ftp-uploading using ASCII
Uploading Binary solves the problem
The reason the did work on some computers was that they had the old css still cached. which was earlyer uploaded in binary instead of the same css files i uploaded in ASCII.
I am experiencing this weird issue where my Chrome browser keeps loading a old version of my website whose code doesn't even exist on my server any more. I assume it's a typical cache issue.
I tried to clean the browser cache, use igcognito mode, and clean DNS cache. The old cached page is still being loaded.
This issue seems to have been discussing on this google group for three years but there is still no solutions. https://productforums.google.com/forum/#!topic/chrome/xR-6YAkcASQ
Using firefox or any other web browsers works perfectly.
It doesn't just happen to me. All my coworkers experience the same issue on my website.
<?php Header("Cache-Control: max-age=3000, must-revalidate"); ?>
You can implement a PHP script that must be the first line of code in your index file . It is an http header typically issued by web servers. You can also rename the resource that is considered "stale". This tutorial will give you more details. https://www.mnot.net/cache_docs/
I'm not sure if I understand your problem correctly, but I was experiencing something similar and instead of clearing the cache I disabled it by doing this:
Open chrome and then go to your website
Press Command + Option + C(Mac)
Now that you've opened chrome's DevTools, go to the main menu where it says: Elements Console Sources ...
Click on the menu element that says Network
Make sure that the "Disable Cache" checkbox is checked
Then reload the page without closing the DevTools
This worked for me.
Let me know if it worked for you :)
A short term fix to view the new version of your site would normally be to clear out the cache and reload, for some reason this doesn't always work on Chrome. This short term solution is not going to fix the problem for every user that's on your site though, it will just allow you to see the new version of your site.
Adding version numbers to CSS and JS files will allow you and every other user, to see the most recent version of your site. A version number will force any browser not to load from the a user's personal computer cache, and instead load the actual files on the server, if the version number varies from the one in the user's cache.
So if you have these files on your server:
ExJS.js
ExCSS.css
and change them to:
ExJS.js?v=1.01
ExCSS.css?v=1.01
the new version of these files will load in any browser.
Normally, a browser will always load the HTML file from the server, but there are some HTML meta tags you can use to make sure that the most recent HTML version will load for any user:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
There are also ways to make sure that files in other languages always load the most recent version as well, which is discussed on this post:
How to add version number to HTML file (not only to css and js files)
You can press on Inspect, then Network and check Disable cache.
change the name of images and make the necessary image name changes in html file.. found this quick fix for my website
I ran into the same issue, and I also tried to disable caching on my JSP pages
<% response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0); %>
But it didn't help.
This is a known issue with google chrome and chromium browsers, even though you clear cache and cookie.
However it may or may not happen for most of the users.
Also this has been unresolved till the date since last 9-10 years.
Hence for testing purposes I would highly recommend to use Mozilla Firefox or Opera.
However it does sounds that your application is limited to certain browsers for best experience, and may not sound convincing to Business/End users.
But having said that, this caching issue may or may not happen to most of us.
You should be able to clear the problem by resetting Chrome. This is the only way I found to clear this condition - after tearing my hair out for half a day.
Prior to finding this, I tried clearing the cache, deleting the contents of the various cache directories etc. in vain.
[As of today May 3 2021] You can do this by gong to 'Settings > Advanced > Reset and clean up > Restore settings to their original defaults'. Note that this will not remove any bookmarks but will log you out of all accounts you are signed into.
Adding CNAME Will help also if you always run site without www, try with www.example.com will work.
I came across this issue developing locally, and tried the following things:
Clearing Cache + generally ALL files in Chrome
Setting the Cache-Control Header like Eli Duhon mentioned.
Setting the Cache Control Header in multiple other ways.
And the only thing that fixed the problem for me was to basically re-start my docker containers on which the app was running.
so I did this:
docker-compose down
And then
docker-compose up
and everything was updated after that.
HOWEVER, if you have changes again, they are still not updated...
So this is certainly not a fix to this problem, as I dont even know what causes this behaviour in the first place, but I assume it has to do something with hot reloading and/or Docker but that was the only thing that did the trick for me so I thought I would mention it here...
I had this problem moving a Wordpress site to new hosting where the URL redirects to .../wp, which hadn't been the case before.
Chrome was helpfully presenting a directory listing showing the file dates from the old server, despite the DNS having updated fully a week ago. So it was obviously demonstrating the problem discussed here.
I added an index.html file with just the following in it:
<meta http-equiv="refresh" content="0; URL='http://my-wp-site.com/wp'"/>
which fixed the problem straight away, including on Chrome browsers that had not had their cache cleared and that had no knowledge of any Google account of mine.
I don't know why this worked, however, given all the problems people have listed above.
you have two options
a) consider fingerprint the stale resources like
<script src="js/app-4829382839238882882bb3442bbbbdhh3kh3.js" type="text/javascript"></script>
b) Add cache control headers such as Cache-Control, Expires on your webserver.
This is a good read on browser caching
I have come across a strange issue with my company's site, and it seems to only affect my computer. Changes that I have made to the raw HTML are not reflected in my browser (Firefox).
I have taken the following steps to resolving this issue, without any luck:
Ensured that the page was uploaded successfully to the correct directory (downloading the file from the server shows that it is the same file as the one just uploaded).
Cleared my browser history and cache, refreshed the page.
Opened the page in other browsers (IE, and Chrome).
RDP'd into our server and opened multiple browsers that way.
A colleague of mine sits directly across from me and he has opened the page in the same version of Firefox that I typically use and he can see the changes. He and I both work on the site regularly.
The strangest part is that I have made changes to this page before, and they showed on my screen instantly. These changes are still in place and visible, yet some HTML elements that existed before I made those changes do not show on my screen currently (despite still existing in the HTML).
Has anyone else ever experienced such a phenomenon? Is there anything else that I can try in order to resolve this issue?
Have you tried forcing cache refresh? Try it by clicking Ctrl + F5