1
我正在讀關於爲什麼應避免爲Web開發人員(http://yoast.com/relative-urls-issues)親屬的網址,但文章怎麼樣的東西像AJAX調用正在某處存儲在同一目錄層次結構的腳本?ajax調用中的相對URL:不好還是好?解決方案?
一個爲什麼相對URL的要點是「仍在使用」是
Relative URLs are often used because developers have a test environment on another
hostname and it makes it easy for them to move stuff between their test environment and
their live environment. Other reasons include that it’s 「just easier in website
maintenance」. They’re also, in my opinion falsely, promoted by some websites about site
speed because they’re 「shorter」 and thus 「faster」.
其中主要就是爲什麼我使用它們以及原因:不必經過每個腳本仔細替換所有網址如果我決定把我的應用程序移到其他地方似乎很容易出錯。
爲了避免討論的話題,我怎麼能有效避免相對鏈接時,我有可能跨越數十個JS multiiple和PHP文件傳播相聯繫的?
修復了鏈接。似乎網站在鏈接末尾插入了一個編碼的斜槓(%5d),博客不喜歡它。在大多數情況下,我不關心假設的速度增益;所有這些「如何推廣您的網站」的文章都會談論SEO和內容,並且最好使用絕對URL來避免有很多斷鏈。 – MxyL