jonniejoejonson Posted October 29, 2008 Share Posted October 29, 2008 why would you not add the full url of a link <a href="http://www.mySite.com/viewProfile.php"> instead of <a href="viewProfile.php"> I understand that the second link is relative to where you are, however is it slower to go to a link that is the full url?... thanks to any responders. Link to comment https://forums.phpfreaks.com/topic/130577-link-type/ Share on other sites More sharing options...
Prismatic Posted October 29, 2008 Share Posted October 29, 2008 For one it helps if you plan on changing domains or do. If your script generates links in http://xxxx.com/script.php format and you change your domain to yyyy.com, you would have to update every single place the script links. Link to comment https://forums.phpfreaks.com/topic/130577-link-type/#findComment-677448 Share on other sites More sharing options...
KevinM1 Posted October 29, 2008 Share Posted October 29, 2008 For one it helps if you plan on changing domains or do. If your script generates links in http://xxxx.com/script.php format and you change your domain to yyyy.com, you would have to update every single place the script links. Exactly. If you're writing your own library or framework, relative paths make it far easier to keep things portable and extensible. As a matter of immediate practicality, it also saves on a decent amount of typing, which I appreciate. Link to comment https://forums.phpfreaks.com/topic/130577-link-type/#findComment-677458 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.