• Resolved lanzoninicola

    (@lanzoninicola)


    Dear Support,
    I usually add style or develop some client-side functionality (javascript script) inside the child theme and then link them through the function.php file.

    I use “wp_enqueue_style” and “wp_enqueue_script” function to do that and in case of update I update the version of the files through the parameter accepted by the mentioned functions (it’s a practice also because of the caching capacity of the hosting provider, it uses Litespeed cache).

    I tried to install your plugin on my site and I see that the service worker always responds to the client request.

    My question is: how are changes detected (e.g. a style change) if the service worker always responds to client requests? Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author SuperPWA

    (@superpwa)

    After changing the stylesheet, You are updating the theme version number. in the same way, Can you please update the SuperPWA version number to update Service Worker caching Using This Constant ‘SUPERPWA_VERSION’?

    Thread Starter lanzoninicola

    (@lanzoninicola)

    Hi @superpwa ,
    Sorry for the late reply and thanks for your answer.

    I’m not developing a theme or plugin but just adding some extra functionality needed for the project by adding my code in the “functions.php” of the child theme chosen for the project (it could be Astra, Hello Elementor or other child theme).
    For example, in the last project I created a new shortcode to render some data in the front-end.

    Following your instructions I will try to change the version number using the constant you reported (I assume that this operation should be done in the functions.php file of child theme), but in this case I have another questions:

    Isn’t that constant used by the plugin when a new update or version is released? If yes, could it generate a conflict? Isn’t it better to have another option (could be another constant) for this?

    Thanks

    • This reply was modified 3 years, 4 months ago by lanzoninicola.
    Plugin Author SuperPWA

    (@superpwa)

    We don’t have this option at this moment in our SuperPWA. Regarding this, We have raised a GitHub ticket in our repository. Our developer will add it and push it in the upcoming update.

    For reference, you can also follow the below GitHub ticket link:
    https://github.com/SuperPWA/Super-Progressive-Web-Apps/issues/211

    Plugin Author SuperPWA

    (@superpwa)

    Sorry for the delay in getting back. We fixed it in our latest update 2.1.16. Can you please check it once by updating it to the latest version and let us know back?

    Thread Starter lanzoninicola

    (@lanzoninicola)

    Thanks guys,

    I will do some tests and I will get back to you as soon as possible.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom styling or javascript support’ is closed to new replies.