HighDots Forums  

Use a 'variable' to avoid repeatedly typing URLs?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Use a 'variable' to avoid repeatedly typing URLs? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Stan Brown
 
Posts: n/a

Default Re: Use a 'variable' to avoid repeatedly typing URLs? - 12-15-2007 , 04:40 AM






Fri, 14 Dec 2007 08:46:05 -0500 from Harlan Messinger
<hmessinger.removethis (AT) comcast (DOT) net>:
Quote:
John U. wrote:
Here is a common problem: I have many (> 100) links on a web page,
all pointing to different pages on the same domain (e.g., "http://
www.x12345.com/").

This is a bother because (1) it takes a lot of typing, and (2) more
importantly, if (or when) the main URL changes, it takes a lot of work
to update the links.

Any text editor--even Windows Notepad--has a search-and-replace feature
that will change the domain for you in a single operation.
In one file at a time. You have to open every file and repeat the
search and replace.

I think that qualifies as "a lot of work".

However, there should be *very* few occurrences of the domain name in
the HTML for a properly constructed site. The link to your home
page, from within the site, should be href="/" and not
href="http://www.example.com".

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you


Reply With Quote
  #12  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Use a 'variable' to avoid repeatedly typing URLs? - 12-15-2007 , 07:58 AM






Stan Brown wrote:
Quote:
Fri, 14 Dec 2007 08:46:05 -0500 from Harlan Messinger
hmessinger.removethis (AT) comcast (DOT) net>:
John U. wrote:
Here is a common problem: I have many (> 100) links on a web page,
all pointing to different pages on the same domain (e.g., "http://
www.x12345.com/").

This is a bother because (1) it takes a lot of typing, and (2) more
importantly, if (or when) the main URL changes, it takes a lot of work
to update the links.
Any text editor--even Windows Notepad--has a search-and-replace feature
that will change the domain for you in a single operation.

In one file at a time. You have to open every file and repeat the
search and replace.

I think that qualifies as "a lot of work".
1. The writer said he has many links on "a" web page.

2. Many text editors allow batch replacement in a collection of files.

3. http://www.orbit.org/replace/.
Quote:
However, there should be *very* few occurrences of the domain name in
the HTML for a properly constructed site. The link to your home
page, from within the site, should be href="/" and not
href="http://www.example.com".
That's what I said.


Reply With Quote
  #13  
Old   
Stan Brown
 
Posts: n/a

Default Re: Use a 'variable' to avoid repeatedly typing URLs? - 12-15-2007 , 02:15 PM



Sat, 15 Dec 2007 08:58:18 -0500 from Harlan Messinger
<hmessinger.removethis (AT) comcast (DOT) net>:
Quote:
That's what I said.
So you did -- I apologize for missing it when I crafted my response.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you


Reply With Quote
Reply




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.