Chrome Devtools Workspaces mapping no longer working

后端 未结 1 1100
说谎
说谎 2021-01-13 04:31

This used to work a charm, and I\'ve set up probably a dozen times in the past, using the same hardware / software, but now it fails:

The necessary permissi

相关标签:
1条回答
  • 2021-01-13 05:19

    It seems to be down to the cache-busting query string which WordPress adds-

    You can see it in my screenshot: ?ver=4.7.2

    clearly I must have only used this DevTools Workspace feature before integration into Wordpress. Here is a relevant Chromium bug report.

    For now, adding this to functions.php in WordPress in order to remove the cache-busting suffix allows me re-enable persistent edits:

    function fj_remove_version( $url ) {
        return remove_query_arg( 'ver', $url );
    }
    
    add_filter( 'style_loader_src', 'fj_remove_version' );
    

    In future, it looks like Persistence 2.0, recommended at the end of the bug report, will be the solution. It can be enabled as a Chrome DevTool experiment now.

    0 讨论(0)
提交回复
热议问题