Clearing cache for [pagespeed-insights]? - caching

We have a site that a client uploaded a couple very large images into a menu, and it killed the load speed for the site on PageSpeed Insights. I went in and completely deleted the image from the media library and replaced it with an optimized image, yet the site is still recieving the same low score for those large images, even though they no longer exist on the site. If you click on the URL of the image with PageSpeed Insights, you get a 404 error, since it doesn't exist anymore. Why is it still showing in PageSpeed Insights? Is there a cache that needs to be cleared? This has been going on for over a week now.

You are using WP-super-cache plugin and something has gone wrong.
Disable the plugin and then look for the folder where it caches images (or just clear the cache within the plugin). Delete the folder.
You may also need to change your NGINX directives as well as I have a feeling they are redirecting incorrectly and that is the cause of the strange behaviour.
I would then use a different plugin.
Make sure to take a backup of the files and database first as there appear to be a lot of complaints about the plugin breaking sites so be careful.

Related

Server Caching?

So, i have this issue where I've uploaded a web page and some supporting files (css, images, etc) - but when I make changes and upload the files, the changes don't show up.
I've tried clearing my local cache, deleting and re-uploading files, and even went into the server's cpanel (I have access to the WHM and backend) to do it directly through the file manager. No changes are taking effect.
I went through and checked the source code to the css file and it's not the same as what I'm uploading.
Is there something I'm missing? Is there such a thing as caching on the server? If so, how do I empty the cache, or fix the issue?
I'm kind of desperate.
Thoughts?
OK! As it stands - I have solved the problem.
The issue was SiteLock Security. It caches a great deal of information that we don't want. While on the phone with support, they ended up showing me how to get 1) purge the caching, and 2) change the settings for caching specific information.
I DO want to thank you all for your input. I DID lead me down the right path. Kudos to you!
Thanks, again!
-mb

Drupal 7 very slow due to cache clearing at each page

I don't know exactly why my drupal 7 website became suddenly slow last week, after few days in production.
With xhprof, i see that at each page load,the system_list_reset() function triggers a call to cache_clear_all() function.
I deactivated all cache features.
I've read that it may due to missing files in modules and/or themes, but I didn't find missing files (except a wrong issue in 'missing module message fixer' module that indicates a missing module in view_export sub-module of view module).
I manually searched them , I didn't find where drupal can list these missing files.
Or maybe it's due to another problem.
Regards,
Open page inspector of your browser and in network tab check what files have unusually long loading time. It maybe be that some external service is causing this. Also it can be that your site is hacked...
Check most banal reason, the storage space - maybe disc of your server is full?
Check if file paths drupal is using are writable. Go to Configuration -> Median -> File system and just click Save. If some path is not writable it will get red outline.
Go to Reports -> Recent log message and check if some issue is maybe logged there. Also check for web server/php logs.
Try updating modules and drupal core - maybe some bug caused that and it's hopefully fixed in module update.
If not, try disabling modules one by one and see will that still happen. If you don't find problematic module try the same method with your theme. Would be good not to try this in production development and/or make backup before doing this.
thanks a lot,
by disabling module one by one, and by "datamining" in drupal DB, i've found that ADVAGG module was guilty.
The clean was difficult, because some entires remains in some tables of Drupal DB afther the module removing, but I hope it Ok.
BEWARE OF ADVAGG MODULE !
Funny :-/ with 'top', I've found a mining soft in /var/tmp/
systemd-private-a5422b1e6694466bbb0b63203573cad1-apache2.service-jMBN4U : nullcrew (from https://github.com/xmrig/xmrig)
I will investigate how it could land on my webserver
Best regards,

Typo3 Neos performance for css and js

I installed Typo3 Neos, Apache and MySQL in a Docker container. The initial page loads in about a second, which seems okay to me. But most css-, javascript- and font-files take extremely long to load, some over 20 seconds waiting time.
A chromium network timeline screenshot can be found on http://postimg.org/image/j3io3s0in/.
All files except the initial html exist as actual files. (I am not familiar enough with neos to say whether they are used, though.)
My apache config contains SetEnv FLOW_CONTEXT Production, and I grepped through the directory where neos is installed to make sure it is not overwritten anywhere.
I also used FLOW_CONTEXT=Production ./flow flow:cache:flush followed by FLOW_CONTEXT=Production ./flow flow:cache:warmup to restart the caches, and even after this and several page loads, the site stays the same.
Any help on how to bring this to adequate performance would be greatly appreciated.
- Simon Kohlmeyer
PS: This is different from Neos Performance in that NehalemWars problem is with the generated html, while mine are with all other files.
It's very unlikely to be related to Neos/Flow directly since what happens is that there is a symlink created for the static resources. So it's likely more related to the system environment and it's handling of symlinks or similar. Neos/Flow is never executed when fetched static resources at all and creates the symlinks if not already available when rendering the response.

Clearing cache in the server

This is related to my problem here:
Editing velocity template of Liferay changes not showing or takes a while
I've tried to investigate the caching problem and tried different things. Here's what I found out.
I just found out that my css is also delayed in showing the updates. I tweak my css file adding comment and testing it on my browser. Now just requesting it on the URL it will just give me an older version of the file. now if i put a query asking for version, (eg. mystyle.css?v2) it will pull the latest file and it records it. I can even see different version, eg. (mystyle.css?v1) or (mystyle.css?v2. I've cleaned my cache so it's definitely on the server side (i think).
Is there a way I can clear my cache?
Thank You!
you can activate Liferay's developer setting by including the properties that are in ROOT/WEB-INF/classes/portal-developer.properties.
Explanation: Liferay minifies and caches CSS and Javascript - once this is done it will not examine those for changes. The developer settings will disable that.
However, you don't want this setting active in production as this will mean that you'll have to load dozens of files instead of very few combined+minified, well cached, files.
I assume you are using this for development, not in production.
If you're having these problems in production, you should rather work with a proper theme plugin and redeploy that.

akamai caching and site rendering

I am the web guy for a large TV station. Our site is cached by Akamai. Pages render perfectly in our testing environment (not cached) and on our "origin" page (again, not cached), but when they are viewed on our live environment (the cached site), they do not render exactly the same as how I coded them. Maybe it's a tiny bit of spacing, maybe it's a CSS element (backgrounds especially) not displaying, and worst of all, forget all about floating DIVs. It's insane how much table design I have to do because of the failure to float.
Does anyone else have experience with caching like this? Is there a tool I can use to see the changes in rendering?
There is no one I can go to for support, because the company doesn't believe the problem exists. Please assist if you can.
The site is built on a VB.Net backend that I do not have access to. I only have access to the front end.
I've been working on sites behind Akamai and can honestly say they don't mess with your code, so that's not the issue. It's more than likely one of the following:
You have a cache latency issue - You updated your html and css, and one of the two updated while the other is still cached by Akamai or using timestamps to increment dependent files. There are several solutions here including making sure to clear cache via Akamai's control panel as well as more programmatic ways of coding. Headers can also be used though not really a preferred way.
Absolute URL's - Relative url's are best when testing on multiple environments to ensure your pointing everything to the same environment.
This is definitely an environment issue not an Akamai issue.
Are stylesheets, Javascript files etc all loading correctly from Akamai?
Can you save a copy of a page retrieved directly from your "origin" server and a copy saved using Akamai, then use diff to look for changes?
And, most importantly, have you asked Akamai about it? It's not really a programming question :)
Download all files as static files from development and then from production. And use a tool like WinMerge to see the differences.
Also does this problem go away if you do CTRL-F5 to refresh the browser?
Perhaps Akamaia isn't seeing the updated versions of your CSS files that are <link />'d in your HTML code? It might be a good idea to embed a version number in the URL so that when you release an updated version of the HTML, it's always going to ask Akamai for a new version of the CSS as well (this applies to images as well I suppose).
Theoretically, Akamai should recognize updated caching headers that your web server sends but I've never worked at a job where we didn't have to have some counter-measures in place to make sure that we could force Akamai to refresh its cached version.

Resources