Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 15th, 2008, 08:50 PM
scapes's Avatar
scapes scapes is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 79 scapes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 25 m 25 sec
Reputation Power: 4
Question general - Absolute vs Relative Paths and Server Load

I was told long ago that relative paths were better to use in web site development (e.g. in HREFs) because absolute paths use additional Apache hits on the server, and therefore additional load.

I have been trying to find out if this load issue is true, after noticing that they seem to cause Apache hits in the logs either way. From what I could find out, absolute paths do mean that Apache has to resolve the domain every time it hits one of the absolute paths - so my question is, would there be any significant increased load from absolute paths in HREFs, IMG tags etc, or is here some form of caching involved perhaps that negates the problem.

Thanks for your input

Reply With Quote
  #2  
Old November 17th, 2008, 08:50 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,732 jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level)jharnois User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 3 Days 14 h 52 m 36 sec
Reputation Power: 977
AFAIK, fully qualified (i.e. http://domain.com/images/foo.png), absolute (i.e. /images/foo.png), and related (i.e. images/foo.png or ../images/foo.png) all look the same to your server. A request for a single webpage then spawns numerous requests for all of its images, javascripts, stylesheets, etc, and you will see all of these in your access logs.

The real difference is between HTTP 1.0 and HTTP 1.1. My understanding is that 1.0 opens a separate connection per request, thereby spawning Apache processes for each request, and that 1.1 sends all of its requests across a single connection, thus using fewer children.

Domain resolution is a requirement of the browser, and the server shouldn't need to do this once the request reaches it. The exception would be if you have reverse lookups on to turn the IP in to a domain name in your logs, which is not recommended and I believe it to be rather rare.
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > general - Absolute vs Relative Paths and Server Load


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT