• Resolved laserstore

    (@laserstore)


    Dear dev!
    I read in the pinned thread that it is possible to create a cached version separately and I “understand” the process described, however when I do, I can’t get the result. I still have the same cache loaded. It turns out that due to design and size issues, my theme allows me to create a separate page for mobile devices, which is very interesting.
    So if you access it on mobile first, the mobile cache ends up being loaded for desktop as well.
    I went to GIT and downloaded your code, placed it inside a specific folder in my theme (there was no asset folder in the example). I went to WP-Config and put the line indicated in the plugin’s FAQ. I also enabled Workers mode in the plugin.
    What could I have done wrong? Could it be the path inside the file? On my host the site folder is inside httpdocs, so I tried several paths, starting with /httpdocs/wp-content… or just /wp-content/… but in no case I was able to generate the pages separately. I just need the main page of the site with separate cache, maybe you have some tips.
    thank you very much for your help, your plugin is fantastic!

Viewing 15 replies - 1 through 15 (of 34 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    It seems like that the path you have provided to the custom worker file is wrong inside the WP Config file. Please note that it needs to be an absolute path and not a relative path. Also log into your CF dashboard > go to the worker section and quick edit the worker added by the plugin. Then you will be able to see if the custom worker code is getting loaded or is it just loading the default worker code.

    If you see that it is loading default worker code that means the path you mentioned inside the WP Config is wrong is not the full absolute path. That is why in the example path you see the path has been started from the /home/ folder and not from /public/ or /public_html/.

    Also keep checking that github gist file occasionally as I might update the worker code to improve it in accordance with the default worker code.

    Thread Starter laserstore

    (@laserstore)

    Hi @isaumya
    Many thanks for the reply! I understand perfectly but I’m having a hard time knowing the absolute path. I know this is not part of the plugin, but the only information I have is from the image.

    View post on imgur.com


    When you mention to check in the cloudflare panel, this appears, but how can I know if it’s correct?

    View post on imgur.com


    Thank you very much!

    Plugin Contributor iSaumya

    (@isaumya)

    Please provide the full cPanel page screenshot. Generally the home directory itself will be something like /home/something/something/htdocs/ and then the rest of your path.

    Thread Starter laserstore

    (@laserstore)

    @isaumya I use Plesk as a panel. This image is from the file manager inside the same panel.

    View post on imgur.com

    I tried using /home/httpdocs, I tried /httpdocs but apparently it didn’t work. Putting the correct path will there be a service change there in the cloudflare dashboard?

    Plugin Contributor iSaumya

    (@isaumya)

    It’s not a guess game. Ask your hosting provider for the absolute path to the htdocs folder e.g. /home/something/something/htdocs/

    Thread Starter laserstore

    (@laserstore)

    @isaumya Thank you! It’s not hosting, it’s just a VPS server on Vultr. I myself end up being responsible for the installed panel. Maybe I can with their support, but usually they don’t give much information.

    Can you confirm if this is how I should insert it in wp-config?

    View post on imgur.com

    Plugin Contributor iSaumya

    (@isaumya)

    yes that seems right. As I said go to CF and quick edit the worker code inside CF to see if it hold the custom worker code or the default worker code.

    Thread Starter laserstore

    (@laserstore)

    @isaumya when I click edit this appears but I don’t see how to access the code

    View post on imgur.com

    Thread Starter laserstore

    (@laserstore)

    Hey @isaumya I found. Yes, the file is loading correctly! Look.

    View post on imgur.com

    So in that case would everything be ok? Because unfortunately it doesn’t work on devices

    Plugin Contributor iSaumya

    (@isaumya)

    yes in that case the worker is creating different cache for mobile and desktop based on the user agent value

    Thread Starter laserstore

    (@laserstore)

    @isaumya thank you for your help. Unfortunately it didn’t work here. If I load by mobile first, the desktop version is also mobile. The same thing happens in reverse. Is there still something I’m doing wrong?

    Plugin Contributor iSaumya

    (@isaumya)

    Can you share your site URL?

    Thread Starter laserstore

    (@laserstore)

    @isaumya https://idogyou.com.br but this site is a test copy of the domain in production, ok?
    If you access it now from the desktop, you will see the mobile version loaded in cache.

    • This reply was modified 4 years, 2 months ago by laserstore.
    Plugin Contributor iSaumya

    (@isaumya)

    Hi @laserstore,
    Yes, I looked at your site and kind of saw the issue. I was able to reply to you due to the weekend. I will take a deeper dive into the updated worker code again and if I update that code I will let you know and you can try this newly updated custom worker code and see what happens.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @laserstore,
    I have updated the code in the Github Gist: https://gist.github.com/isaumya/b4776a7f7b7c56a50aa8e75f1dd60aa8

    Can you try this new custom worker code and let me know what you see. Also as I can see that you have turned off the plugin on your site so I can’t check it from my end as well.

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

The topic ‘Mobile Page Separated Cache’ is closed to new replies.