gpeipman
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] Adding lazysizes to aggregated jsCDN Enabler plugin doesn’t seem to affect anything. What made things work was leaving CDN URL empty in Autoptimize settings.
I think that the problem may happen with this code block in add_lazyload_js_footer() function:
$lazysizes_js = plugins_url( ‘external/js/lazysizes.min.js?ao_version=’ . AUTOPTIMIZE_PLUGIN_VERSION, __FILE__ );
$cdn_url = $this->get_cdn_url();
if ( ! empty( $cdn_url ) ) {
$lazysizes_js = str_replace( AUTOPTIMIZE_WP_SITE_URL, $cdn_url, $lazysizes_js );
}No matter what it noptimize attribute is set or not there will be CDN URL if provided. Changing this if to:
if ( ! empty( $cdn_url ) && $noptimize_flag != ”)
made things work. And it doesn’t matter if CDN Enabler is active or not.
Forum: Plugins
In reply to: [Autoptimize] Adding lazysizes to aggregated jsI don’t have any script exclusions defined. But I have another CDN plugin in use. I will check if this is the case and come back to you later. Thanks for advice!
Forum: Plugins
In reply to: [Autoptimize] Adding lazysizes to aggregated jsFor testing purposes I have back-door access to my WordPress VM-s and there caching doesn’t apply. I saw that data-noptimize=”1″ attribute is added or left out based on if I had this filter added or not. But it was the only thing that changed. Script reference to //static.gunnarpeipman.com//wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=2.7.1 was always printed out to footer of page.
Forum: Plugins
In reply to: [Autoptimize] Adding lazysizes to aggregated jsHi,
it doesn’t seem to work.
Still I see the following script reference in the footer of my page:
<script async=”” data-noptimize=”1″ src=”//static.gunnarpeipman.com//wp-content/plugins/autoptimize/classes/external/js/lazysizes.min.js?ao_version=2.7.1″></script>
My question was about getting rid of this script reference and having lazysizes.min.js embedded to JavaScript file that Autoptimize combines of JavaScripts referenced on page.
I have currently version 2.7.1 installed.
Forum: Plugins
In reply to: [WebP Express] Support CDN URLHi!
Thanks a million for this feature as it greatly improves page speed statistics.
I made my tests on this update and it’s now live in my blog https://gunnarpeipman.com. I confirm there’s no conflicts with other plugins and plugins order doesn’t matter anymore. CDN enabler, Autoptimize and WP Super Cache can now live their own lives and WebP Express works no matter what.
Great job, guys! And thanks again!
Forum: Plugins
In reply to: [Autoptimize] Keeping Autoptimize cache on mountI agree, this topic can be closed.
About WP Super Cache – I try to solve this issue by making it using some other directory so it doesn’t wipe off things it shouldn’t touch.
Thanks for helping me!
Forum: Plugins
In reply to: [Autoptimize] Keeping Autoptimize cache on mountHi,
I can confirm it works stable now. Styles and scripts live on mounted Azure File Shares and there’s no issues when files are served directly from WordPress. I think this solution can be confirmed as working.
My next experiment will be with Azure Blob Storage (some higher tier) so Autoptimize files can be automatically picked up by CDN.
One things I noticed – files from Autoptimize folders are deleted when cleaning WP Super Cache caches. Not sure what it is exactly doing or why but there’s a correlation. Everytime I clean WP Super Cache caches the number of Autoptimize files drops. Again, I don’t know yet why it happens.
Forum: Plugins
In reply to: [Autoptimize] Keeping Autoptimize cache on mountIt’s a little bit weird. During ~2h after moving to file shares the number of scripts and styles changed. 24 files and then 14 files etc. But it stabilized over day. I checked plugins and themes – none of these calls clearall(). I’m not yet sure what actually made files disappear.
Forum: Plugins
In reply to: [Autoptimize] Keeping Autoptimize cache on mountIt seems to work now with Azure File Shares. Files are written there and everything seems to work. I started new mobile friendliness validations on Google Search Console and I will wait until these are done by Google.
Meanwhile one question. Although files are written to file share I saw the number of CSS files growing and decreasing. First attempts to start validation in search console gave me immediate result that some pages are invalid. During requests by Google files were generated and some of them later disappeared magically. What causes this behavior? Is it possible to leave once generated scripts to disk for let’s say two days to make sure that all clients have already invalidated these?
Forum: Plugins
In reply to: [Autoptimize] Keeping Autoptimize cache on mountSticky load-balancing and other more advanced ones come on Azure with way higher price tag. Additionally these options doesn’t distribute load well as requests to one VM are not distributed to others.
What are the options for me with basic load-balancing? Should I make Autoptimize cache folder to symlink that points to shared storage? Or is there some script variable I can modify?
Forum: Plugins
In reply to: [Autoptimize] Problems with multi-server deployments and CDN-sThanks for explanation, everything works now!
Br,
GunnarForum: Plugins
In reply to: [WebP Express] Problem with image urls in post bodyIn total there can be three types of full URL-s to consider:
1. Site url from WordPress settings
2. Alternate URL for specific machine in farm (one for every machine)
3. CDN URL1. and 2. are usually insterted by humans. Yes, they can sometimes use machine URL although it’s not allowed. It just happens. 3. is by random CDN plugin.
Hi!
Yes, sure, I can share. Here we go:
Old structure: https://gunnarpeipman.com/2018/05/sample-post/
New structure: https://gunnarpeipman.com/category-name/sample-post/By example: https://gunnarpeipman.com/aspnet/blazor-pager-component/
I’m not 100% sure if this is the issue with vanilla installation of things. I have also some SEO plug-ins installed but these doesn’t seem to involve to redirects.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Problem with category URLsHi!
In my plugin I make some HTML clean-up (I have posts ported from previous blog) to remove or work around some legacy HTML stuff the way that problems doesn’t come up with AMP plugin. There were problems that I was able to solve with plugin within few hours but doing same thing on very general manner would be huge load of work for you as you have to support big number of users.
There is also one series plugin that generates series menu to some posts like here: https://gunnarpeipman.com/2018/01/ref-returns-ref-locals/amp/ Without my plugin links in post body get /amp/ to the end but not entries in series table of contents.
I also added categories list in WordPress menu manager to AMP menu and these also didn’t got /amp/ added to end of URL-s there. So, I tried to manage it with my plugin but then suddnely some links got /amp/amp/ to the end. I found out that I should check if link callback is done for categories list in body or for categories menu but I didn’t found any normal way for this.
NB! Turning on AMP for menus made a trick! Thanks ??
- This reply was modified 7 years, 1 month ago by gpeipman.
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Wrong comments count on AMP pagesHi!
If I try to analyze things on practical side then I don’t think mobile readers are interested in trackbacks. Trackbacks often doesn’t provide enough information to attract readers to follow their links. So, I think correcting the number of comments is better option.