Hello,
Thank you for your reply.
Unfortunately, the guide you shared does not address the specific issues I mentioned.
I’m looking to allow users to select their city for the weather widget, just like on https://in.gr, directly from the header — not just display a static default city.
I also asked how to exclude the date and weather widgets in the header from being cached by page caching plugins like “WP Cloudflare Super Page Cache,” but the guide makes no mention of this either.
Can you please provide guidance on how to implement these two specific features?
Thank you in advance!
Hello again,
I also attach the answer of a community member in cloudflare forum.
<><><><><><><><><><>
Hi Mike,
I’m assuming you’re using Cache Everything. In that case, Cloudflare will cache the page based on its URL, and deliver that to any device that requests that URL. So if you theme has any adjustment that changes content based on device, this would only work if you turn off Cache Everything on Cloudflare, making each request reach the origin.
For separate mobile/desktop versions to work properly, you’d need to create them under separate URLs, such that the mobile version would be somehow distinguishable from the desktop one:
https://mobile.example.com/some-page/
or
https://www.example.com/mobile/some-page/ > mobile
or
https://www.example.com/some-page/?device=mobile
So you’d need to contact the developers of either your theme or cache plugin to ask them if they have any way to separate the mobile version into another subdomain, subdirectory, or query string.
If you opt for the subdomain, you can set Mobile Redirect on Cloudflare by visiting:
https://dash.cloudflare.com/?to=/:account/:zone/speed/optimization
An inline JavaScript could be used to perform the mobile redirect based on device, if you only have the options of subdirectory or query string. Since an inline JS would be cached along with the HTML, it would be present in every page and only act after being on the device.
Then of course there’s the possibility of using Cloudflare Workers to control the redirect and caching. Workers is a paid service, but it does have a trial version. Please check the documentation for examples, tutorials, etc.
https://developers.cloudflare.com/workers/
<><><><><><><><><><><>
I have 2 staging enviroments with the same error from google pagespeed tool
https://exclusiveweb.gr and
https://nealive.gr
https://developers.google.com/speed/pagespeed/insights/?hl=el&url=https%3A%2F%2Fexclusiveweb.gr
https://developers.google.com/speed/pagespeed/insights/?hl=el&url=https%3A%2F%2Fnealive.gr%2F
It cannot be a coincidence
Hello again
I am totally not covered by your answer, it seems to be a major Bug in tagdiv composer and i have identify it now that I am trying to build the staging site brick by brick, its not about cashing plugins speed etc.
I have tried in the beginning to migrate to another Vps host with plesk migrator tool, lost several days in trials and errors and DB’s 100% when I was just surfing to the new environment.
Right now its the 10th time I am importing posts (160.000) and media files etc separate to the new WordPress installation and try step by step to see what is causing the error.
When I restored the production (https://sportlive.gr) theme settings to the staging one (https://nealive.gr) i saw that when I was doing all the filtering to the categories the composer is very sensitive and if there is an overlap in the filtering it causes several errors.
Also even google pagespeed tool seemes to identify the errors https://developers.google.com/speed/pagespeed/insights/?hl=el&url=https%3A%2F%2Fnealive.gr%2F as you can see from this its causing FAILED_DOCUMENT_REQUEST.
So there is nothing to do with the speed, something with tagdiv is messing the whole staging enviroment to the new server!
Right now I removed all the overlaping categories filtering and kept it to just minimum and Without mobile template to check it, and at the right corner the section ΑΥΤΟΚΙΝΗΤΟ when I am placing the correct filter category “ΑΥΤΟΚΙΝΗΤΟ” its messing all website and its showing the error you can see in the google page speed tool,
When I remove the filter and leave it to all categories empty the error miraculously gone and I don’t know what else to do!
I am absolutely sure that is a bug and your devs must seen to it and tried to tackle it with all the possible ways I knew, plesk cloning, wordpress importing taxonomy per taxonomy and for SURE the error is in the homepage filtering and the tagdiv composer!!!
I am available to give you creds for the staging https://nealive.gr to investigate further!
I am very lucky the production site is working without flaws but I cannot migrate to another host I am STUCK with IT!!
Also i fix these problems in both environments but https://exclusiveweb.gr is still very slow compared to the source site!
Hello Vlad ,
thanks for the info, but these files you show me are missing also from the source https://sportlive.gr so i don’t think that is causing the problem!
Hello,
I have tried your suggestion but currently I am on a shared hosting environment with over 12.000 pics for regeneration, it just never ends, and I am not sure if this plugin actually deletes the unnecessary thumbs…
One faster way i found if someone has shell access to the Host domain is the below.
cd directory to the upload folder of the wordpress for ex.
cd /example.com/wp-content/uploads/2020/01/
and run the following with correction to the resolutions you don’t need.
find . -type f -name ‘*[324]x[400]*’ -delete
find . -type f -name ‘*[1068]x[0]*’ -delete
find . -type f -name ‘*[1920]x[0]*’ -delete
find . -type f -name ‘*[0]x[420]*’ -delete
find . -type f -name ‘*[80]x[60]*’ -delete
find . -type f -name ‘*[265]x[198]*’ -delete
find . -type f -name ‘*[1068]x[0]*’ -delete
find . -type f -name ‘*[356]x[220]*’ -delete
find . -type f -name ‘*[356]x[364]*’ -delete
find . -type f -name ‘*[533]x[261]*’ -delete
find . -type f -name ‘*[534]x[462]*’ -delete
find . -type f -name ‘*[696]x[385]*’ -delete
find . -type f -name ‘*[741]x[486]*’ -delete
find . -type f -name ‘*[1068]x[580]*’ -delete
this one delete FAST all the thumbnails not needed by your theme.
Best Regards