Hello Santhosh,
Thank you for opening a separate ticket, that helps.
In your case, the 404 response is from the web server and not from WordPress, so I think it’s the cache plugin that is causing this.
Can you add the following to the functions.php
of your active theme:
/**
* Cache busting for SuperPWA manifest.
*
* @link https://superpwa.com/codex/superpwa_wp_head_tags/
*/
function superpwa_helper_cache_busting_manifest( $tags ) {
// Add ?nocache query string to manifest for cache busting.
$tags = preg_replace( '/<link rel="manifest" href="(.+)">/', '<link rel="manifest" href="$1?nocache">', $tags );
return $tags;
}
add_filter( 'superpwa_wp_head_tags', 'superpwa_helper_cache_busting_manifest' );
/**
* Register service worker with cache busting query string.
*
* @link https://github.com/SuperPWA/Super-Progressive-Web-Apps/blob/c3eafd27e207b52e3f1f83de392eeec0ecee1109/public/sw.php#L217-L232
*/
function superpwa_helper_register_sw() {
wp_enqueue_script( 'superpwa-register-sw', SUPERPWA_PATH_SRC . 'public/js/register-sw.js', array(), null, true );
wp_localize_script( 'superpwa-register-sw', 'superpwa_sw', array(
'url' => parse_url( superpwa_sw( 'src' ), PHP_URL_PATH ) . '?nocache',
)
);
}
remove_action( 'wp_enqueue_scripts', 'superpwa_register_sw' );
add_action( 'wp_enqueue_scripts', 'superpwa_helper_register_sw' );
Once that is added, clear the cache. Please let me know how it goes.