Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 05-06-2006, 01:56 AM   #1 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
What does leaving 'www' out of an address do?

I don't really get why leaving the 'www' prefix out of an address
#1 still leads you to the site you're trying to get to
#2 but breaks certain javascript functions

I'm building a shopping cart with php/mysql/javascript and ajax. I'm using ajax to update item quantities, but when I leave the 'www' out, and the script tries to write the updated price to the page, permission is denied.
__________________
Current Project
Redline is offline   Reply With Quote
Old 05-06-2006, 02:38 AM   #2 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
The way the internet works is a little confusing because of an inverse hierarchial decision that was made for the addressing. Basically after the 'http://' part until the first '/' you have things listed from most specific to least and after the slash you have things listed from least specific to greatest. So for the example in the url http://www.example.com/bigfolder/littlefolder/somepage.html . You can think of .com as representing a root of a tree containing every .com address (google, miscrosoft, codenewbie, etc) , the example tells the browser where to look for a machine called 'www' . In a lot of cases the machine www is the machine pointed to by the root url. That's why you go to the same place. The path /bigfolder/littlefolder/somepage.html refers to a file on www.

As to why it breaks javascript, I assume there's some bad validation happening.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Old 05-07-2006, 07:06 PM   #3 (permalink)
nimaj
Registered User
 
Join Date: Jan 2004
Location: Poughkeepsie, NY
Posts: 18
nimaj is on a distinguished road
Send a message via AIM to nimaj Send a message via Yahoo to nimaj
or javascript is looking for a cookie belonging to 'www.whatever.something'.
nimaj is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing a specific memory address madtown54 Standard C, C++ 1 03-16-2005 05:17 AM
How to send multiple records from db to email address roexecom PHP 3 02-14-2005 10:39 PM
MAC address iwanttolearnc Platform/API C++ 0 07-27-2004 10:46 PM
Changing my IP address tomCollins Java 3 03-23-2003 09:54 AM


All times are GMT -8. The time now is 09:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting