Chrome Devtools Workspaces mapping no longer working

泄露秘密 提交于 2019-12-01 08:26:52
J Griffiths

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!