打開wordpress后臺,發(fā)現(xiàn)很卡,通過開發(fā)者工具看到是因為加載http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css這個元素導(dǎo)致的.
- <link rel='stylesheet' id='jquery-ui-smoothness-css' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css' type='text/css' media='all'/>
解決方案:
在functions.php里面添加如下代碼:
- function hc_cdn_callback($buffer) { return str_replace('googleapis.com', 'useso.com', $buffer); } function hc_buffer_start() { ob_start("hc_cdn_callback"); } function izt_buffer_end() { ob_end_flush(); } add_action('init', 'hc_buffer_start'); add_action('shutdown', 'hc_buffer_end');//開源軟件:Vevb.com
新聞熱點
疑難解答
圖片精選