• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is the difference b/w http://lge.com and www.lge.com

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How are you?
i would like to know what is the difference b/w "http://lge.com" and "www.lge.com".

check this example:

http://my.lge.com
this is not opening like "www.my.lge.com"

why the people hosting some of the sites like www.domainname.com
and some of the sites like http://domainname.com
please check the above example.
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is really nothing to do with Java, but I'll have a quick go at this one.

The two examples given are completely different URLs. However, many browsers use heuristics to try to guess what the user meant, when given an incomplete URL.

For instance, if there's no protocol in the URL, as is the case with "www.lge.com", a browser may guess that the user meant "http://www.lge.com".

Most Web sites have a host name that starts with "www". However, that is only a convention and it is perfectly possible to have host names that start with something else. The URL "http://lge.com" is a plausible Web site URL, with the host "lge.com". However, if a browser finds that there is no Web site that that URL, it may guess that the user meant "http://www.lge.com".

Such guessing heuristics typically will not be available in Java. If you want to open a Web site in Java code, you will typically need to give a full URL, with correct protocol and host name.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a thing in the world to do with servlets, so moved to General Computing.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one more point to add:

The sites sometimes are NOT very clever that they buy the Domain Name www.xyz.org instead of xyz.org so that unless you give explicitly the one starting with www., you cannot reach the site.

(also I guess, related with the configuration of either the client software and/or server on which the site is being hosted.)
But the thing is that, one should get the domain-name without the www while buying.
reply
    Bookmark Topic Watch Topic
  • New Topic