Forum Replies Created

Viewing 15 replies - 1 through 15 (of 129 total)
  • Thread Starter Alwin

    (@wp-opti)

    I think I already did something like that: I went to the files on my webserver and went to he cache folder >> file-based-page-cache-functions.php there.

    I deleted the line: if (defined(‘DOING_CRON’) && DOING_CRON) return;

    It did not help.

    Thread Starter Alwin

    (@wp-opti)

    I have find the line of code now 🙂

    Should I remove this line of code?

    Thread Starter Alwin

    (@wp-opti)

    Thank you for your help.

    But where can I find this line:
    cache/file-based-page-cache-functions.php

    And do I have to remove it?

    Thread Starter Alwin

    (@wp-opti)

    Any update?

    Thread Starter Alwin

    (@wp-opti)

    I have since received an answer from NewRelic support: at the time NewRelic started to monitor the uncached pages, they switched to Google DNS Server and Cloudflare, instead of relying on System DNS Configuration.

    So in summary, the following happened:

    • NewRelic switched to Google DNS and Cloudflare
    • From that moment NewRelic stopped monitoring the cached pages, and monitored the not cached pages.
    • With an older version of WPO 3.8.0 NewRelic is still monitoring the cached pages, even though NewRelic now uses Google DNS and Cloudflare.

    So as of WPO version 4.0.0, something has changed in the WPO plugin, which prevents NewRelic from monitoring the cached pages.

    Also, another cache plugin (Litespeed Cache) I have installed on antoher website, shows no difference in NewRelic before and after switching to Google DNS.

    So must be something in WPO, starting from version 4.0.0

    Thread Starter Alwin

    (@wp-opti)

    I will create a support ticket with NewRelic today.

    In the meantime, I did another test today: I reset WPO to version 3.8.0.

    From the moment the old version is active, NewRelic immediately monitors the cached page again! NewRelic also sees the keyword “Cached by WP-Optimize” in the source code again.

    Immediately from the moment I update WPO to the latest version, 4.0.1, NewRelic stops monitoring the cached page, and can no longer see the keyword in the source code.

    So something has changed after WPO version 3.8.0 that causes NewRelic to no longer see the cached pages. I wonder if that will also be the case with some real website visitors?

    Thread Starter Alwin

    (@wp-opti)

    These newrelic graphs are for http://www.greenconnections.nl:

    This graph shows the increase in response time immediately after updating WPO to version 4.0.0 at 11 February:

    Today I uninstalled WPO completely from this site at 10:30 and reinstalled at 11:00. As you can see nothing changend in NewRelic in this time period:

    However, it seems to be a NewRelic specific issue because I use antoher uptime monitor service called BetterStack and that one does show the period when WPO was uninstalled today:

    So cache is working fine on all my 10 websites. But from the exact moment I upgraded WPO to version 4.0.0 NewRelic does not monitor the cached pages anymore, and can’t see the keyword “Cached by WP-Optimize” in the source code either. Other uptime monitoring service does not have this issue.

    Strange, isn’t it 🙂

    • This reply was modified 1 year, 3 months ago by Alwin.
    Thread Starter Alwin

    (@wp-opti)

    Hello,

    My site url is https://www.einberg.nl

    But that is 1 site out of 10 where the same thing happened after updating to verion 4.0.0

    I do not have a newrelic plugin installed, and I purged the cache several times. Did not make any difference, since version 4.0.0 newrelic is monitoring the uncached pages on all 10 websites I have WPO installed. Websites without WPO installed are still monitored by newrelic as before (so cached pages).

    • This reply was modified 1 year, 3 months ago by Alwin.
    Thread Starter Alwin

    (@wp-opti)

    Hello Daan, I do think it is a little bit strange that you are not aware of this, cause you are the plugin builder, right…

    Anyway, this is the code that CAOS plugin inserted on my website:

    <script>
    window.minimalAnalytics = {
    trackingId: 'G-XXXXXXXXX',
    autoTrack: true, defineGlobal: true
    }
    </script>

    <script>
    !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(()=>(()=>{"use strict";var e={508:(e,t,n)=>{function o(e,t=300,n=0){return(...o)=>(clearTimeout(n),n=setTimeout(e,t,...o))}function i(e=16){return e=e>16?16:e,
    ${Math.floor(1e16*Math.random())}.padStart(e,"0").substring(-1,e)}function s(e,t=16){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n&=n;return n=Math.abs(n),${n}.padStart(t,"0").substring(-1,t)}function r(){const e=document.body,t=window.pageYOffset||e.scrollTop,{scrollHeight:n,offsetHeight:o,clientHeight:i}=document.documentElement,s=Math.max(e.scrollHeight,n,e.offsetHeight,o,e.clientHeight,i)-window.innerHeight;return Math.floor(100*Math.abs(t/s))}function a(e,t){let n=e;for(;n&&(!(null==n?void 0:n.matches)||!(null==n?void 0:n.matches(t)));)n=null==n?void 0:n.parentNode;return n}function c(e){let t,n,o=!1;try{({hostname:t,pathname:n}=e&&new URL(e)||{})}catch(e){}return t&&(o=t!==window.location.host),{t:o,hostname:t,pathname:n}}n.r(t),n.d(t,{o:()=>u,i:()=>d,u:()=>o,l:()=>m,m:()=>f,g:()=>p,v:()=>s,p:()=>i,h:()=>r,_:()=>g,$:()=>v,S:()=>c,j:()=>a,I:()=>l});const u="clientId",l="sessionId",d="sessionCount";function f(){const{hostname:e,origin:t,pathname:n,search:o}=document.location,i=document.title;return{location:t+n+o,hostname:e,pathname:n,referrer:document.referrer,title:i}}function m(e=u){const t=i(),n=localStorage.getItem(e);return n||(localStorage.setItem(e,t),t)}function g(e=l){const t=i(),n=sessionStorage.getItem(e);return n||(sessionStorage.setItem(e,t),t)}function v(e){const t=localStorage.getItem(u)?void 0:"1",n=sessionStorage.getItem(l)?void 0:"1";let o=sessionStorage.getItem(d)||"1";return e&&(o=function(e=d){let t="1";const n=sessionStorage.getItem(e);return n&&(t=""+(+n+1)),sessionStorage.setItem(e,t),t}()),{firstVisit:t,sessionStart:n,sessionCount:o}}function p(e){return Array.isArray(e)?e.map((e=>e.map((e=>null==e?void 0:e.toString())))):Object.keys(e).map((t=>[t,${e[t]}]))}},209:(e,t)=>{Object.defineProperty(t,"M",{value:!0}),t.files=t.k=void 0;t.k={protocolVersion:"v",trackingId:"tid",pageId:"_p",language:"ul",clientId:"cid",firstVisit:"_fv",hitCount:"_s",sessionId:"sid",sessionCount:"sct",sessionEngagement:"seg",sessionStart:"_ss",debug:"_dbg",referrer:"dr",location:"dl",title:"dt",eventName:"en",eventParam:"ep",eventParamNumber:"epn",screenResolution:"sr",enagementTime:"_et"};t.files=["pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi","mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma"]}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var o in t)n.D(t,o)&&!n.D(e,o)&&Object.defineProperty(e,o,{O:!0,get:t[o]})},n.D=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"M",{value:!0})};var o={};return(()=>{var e=o;Object.defineProperty(e,"M",{value:!0}),e.track=void 0;const t=n(508),i=n(209),s="undefined"!=typeof window,r=s&&window.minimalAnalytics?.defineGlobal,a=s&&window.minimalAnalytics?.autoTrack,c=["q","s","search","query","keyword"];let u,l,d,f=[[Date.now()]],m=!1;const g="page_view",v="scroll",p="click",w="view_search_results",h="user_engagement",y="file_download";function b(e,{type:n,event:o,debug:s}){const{location:r,referrer:a,title:u}=(0,t.m)(),{firstVisit:l,sessionStart:d,sessionCount:f}=(0,t.$)(!m),g=self.screen||{};let v=[[i.k.protocolVersion,"2"],[i.k.trackingId,e],[i.k.pageId,(0,t.p)()],[i.k.language,(navigator.language||"").toLowerCase()],[i.k.clientId,(0,t.l)()],[i.k.firstVisit,l],[i.k.hitCount,"1"],[i.k.sessionId,(0,t._)()],[i.k.sessionCount,f],[i.k.sessionEngagement,"1"],[i.k.sessionStart,d],[i.k.debug,s?"1":""],[i.k.referrer,a],[i.k.location,r],[i.k.title,u],[i.k.screenResolution,${g.width}x${g.height}]];return v=v.concat(function({type:e="",event:n}){const o=document.location.search,s=new URLSearchParams(o),r=c.some((e=>new RegExp([?|&]${e}=,"g").test(o)))?w:e,a=c.find((e=>s.get(e)));let u=[[i.k.eventName,r],[${i.k.eventParam}.search_term,a||""]];return n&&(u=u.concat((0,t.g)(n))),u}({type:n,event:o})),v=v.filter((([,e])=>e)),new URLSearchParams(v)}function _(){return f.reduce(((e,[t,n=Date.now()])=>e+(n-t)),0).toString()}function $(e,n){const o=(0,t.j)(n.target,"a, button, input[type=submit], input[type=button]"),s=o?.tagName?.toLowerCase(),r="a"===s?"link":s,a=o?.getAttribute("href")||void 0,c=o?.getAttribute("download")||void 0||a,{t:u,hostname:l,pathname:d}=(0,t.S)(c),f="link"===r&&!u,[m]=c?.match(new RegExp(i.files.join("|"),"g"))||[],g=m?y:p,v=${i.k.eventParam}.${r};if(!o||f&&!m)return;let w=[[${v}_id,o.id],[${v}_classes,o.className],[${v}_name,o?.getAttribute("name")?.trim()],[${v}_text,o.textContent?.trim()],[${v}_value,o?.getAttribute("value")?.trim()],[${v}_url,a],[${v}_domain,l],[${i.k.eventParam}.outbound,${u}],[i.k.enagementTime,_()]];m&&(w=w.concat([[${i.k.eventParam}.file_name,d||c],[${i.k.eventParam}.file_extension,m]])),D(e,{type:g,event:w})}function S(){const e=f.length-1,[,t]=f[e];t||f[e].push(Date.now())}function x(){const e=f.length-1,[,t]=f[e];t&&f.push([Date.now()])}function j(){const e=f.length-1,[,t]=f[e],n=["hidden","visible"].indexOf(document.visibilityState),o=Boolean(n);-1!==n&&(o?t&&f.push([Date.now()]):!t&&f[e].push(Date.now()))}const I=(0,t.u)((e=>{if((0,t.h)()<90)return;const n=[[${i.k.eventParamNumber}.percent_scrolled,90]];D(e,{type:v,event:n}),document.removeEventListener("scroll",l)}));function M(e){const t=[[i.k.enagementTime,_()]];D(e,{type:h,event:t})}function k(e){m||(u=$.bind(null,e),l=I.bind(null,e),d=M.bind(null,e),document.addEventListener("visibilitychange",j),document.addEventListener("scroll",l),document.addEventListener("click",u),window.addEventListener("blur",S),window.addEventListener("focus",x),window.addEventListener("beforeunload",d))}function D(...e){const[t,{type:n,event:o,debug:i}]=function(e){const t=window.minimalAnalytics?.trackingId,n="string"==typeof e[0]?e[0]:t,o="object"==typeof e[0]?e[0]:e[1]||{};return[n,{type:g,...o}]}(e);if(!t)return void console.error("GA4: Tracking ID is missing or undefined");const s=b(t,{type:n,event:o,debug:i}),r=window.minimalAnalytics?.analyticsEndpoint||"https://www.google-analytics.com/g/collect";navigator.sendBeacon(${r}?${s}),k(t),m=!0}e.track=D,r&&(window.track=D),a&&D()})(),o})()));
    </script>

    <script>

    So, do you see anything unexpected here?

    Thanks,

    Alwin

    Thread Starter Alwin

    (@wp-opti)

    Hello Daan,

    That’s what I thougt… but Minimal Analytics does track counties, cities, devices, platforms and so on on the website I installed it.

    There is no other GA code installed on this site (einberg.nl) so how is this possible?

    Thread Starter Alwin

    (@wp-opti)

    Thank you, so if I understand correctly a browser never serve the old (browser) cached version without cheking for a new version first?

    Thread Starter Alwin

    (@wp-opti)

    Thank you for your help. HJowever, the plugin was deactivated when I updated it. Still, WP-Optimkize did not purche the cache after the plugin update.

    Thread Starter Alwin

    (@wp-opti)

    I have decided to continue using wp-rocket for the time being. Thanks for all the help so far!

    Thread Starter Alwin

    (@wp-opti)

    No, the pages that are not cached do not have the same issue (with embed Google Maps)! In fact, the contact page with Google maps is one of the only pages thtat is cached everytime I check the source code.

    I just visited einberg.nl and 5 of 12 pages are not cached by wp-optimize (no Cached by… text in source code).

    Again, looking at my server maps and folders, these pages are in the list of cached pages (wp-content/cache/wpo).

    After I visit a not cached page, close my browser (clear browser cache) and re-open the page, then it is cached (timestamp 1 minute before).

    So something is wrong with the preload function of wp-optimize. It is creating a list on my server (wp-content/cache/wpo) with all pages, but then not all those pages are cached in the browser.

    Thread Starter Alwin

    (@wp-opti)

    Thanks for your help, but I still don’t have an answer to my original question: why aren’t all pages cached?

    I just checked my website and 5 out of 12 pages are now not cached by wp-optime! These 5 pages are in the list of cached pages in the server folders /wp-content/cache/wpo.

    So what’s going on with the wp-optime plugin?

Viewing 15 replies - 1 through 15 (of 129 total)