Solved

BASE HREF details needed

Posted on 1998-01-08
12
490 Views
Last Modified: 2010-05-19
Hi,
I want to specify base href in an online .html file.  Specifically, I want to set base href to a local (hard drive) folder, which visitors can download from the net as a self-extracting archive.
******************
What I need is the EXACT format for the tag (BASE HREF=?????????)  <BASE HREF=?????????>.
******************
FYI  I have a routine in place which extracts the path from a cookie, and writes the BASE HREF tag using JavaScript.
0
Comment
Question by:boatful
12 Comments
 

Expert Comment

by:sandburd
Comment Utility
The format is : <BASE HREF="http://www.myhost.com/">
0
 

Author Comment

by:boatful
Comment Utility
Sorry but I can't accept this answer, Sandburg, because (as I said)  I need to set BASE HREF to a LOCAL folder (i.e. on the user's hard drive).  I presume the format would be something like <BASE  HREF='file:///C|/Download/'>, but I posted the question to get precise guidance on formatting the tag.
0
 

Expert Comment

by:sandburd
Comment Utility
the base href you type : <BASE HREF="file:///C|/Download/"> is right for a base href to a folder on the hard-drive
0
 

Author Comment

by:boatful
Comment Utility
For NN it's <BASE HREF="file:///C|/www/trybaseh.htm">
For MSIE it's <BASE HREF="file:C:www/trybaseh.htm">

I answered my own question. What do you know????
0
 
LVL 5

Expert Comment

by:Christian_Wenz
Comment Utility
both MSIE and NN support file:/// and then the exact path, where : is converted to | and backslashes become slashes.
The more recent versions of MSIE and NN accept the standard DOS format, as well - but older versions accept the file:///C|... only.

HTH
0
 
LVL 2

Expert Comment

by:yyyannag
Comment Utility
you can't use "<BASE HREF=>" on a local disk.
you have to move your files to a server.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:boatful
Comment Utility
You most certainly CAN set base href to a local disk.  I have a self-extracting zip archive available to my online clients, so that 400 kb or so of graphic and htm files download and unzip to their hard drive.  The target directory name is stored in a cookie, so whenever they visit the WWW site the parent frame reads the cookie and sets base href to the correct local directory.  As of today I have this working flawlessly in NN and MSIE.  The comments from Christian W. were most helpful and  I would like him to have the points.
0
 
LVL 4

Expert Comment

by:jshamlin
Comment Utility
You *can* set the BASE HREF to a local file location, but it's pretty haphazard because not all users' hard drives will be configured similarly.  Your page will only  "work" on a certain platform and OS, and then only if the user has a "standard" configuration (hasn't done any custom installs).

Since you really can't control the file structure of users' drives, and since very few users will have a specific "fingerprint," it's not advisable.
0
 
LVL 3

Expert Comment

by:gwalters
Comment Utility
You didn't say why you needed this.  Seems to me as long as all your links and image references are relative, it doesn't matter where they extract the archive.
0
 

Author Comment

by:boatful
Comment Utility
Regarding the comment from JShamlin,
Is there a way in Java or JavaScript to test for the client's operating system (ie WIN or W95, etc)??  I feel confident that the script I've written for saving BASE HREF of the local directory in a cookie in the WINDOWS environment works!  If there's a way to screen for OS, I can warn those non-windows OS client's that the batch download is not guaranteed to work.
0
 

Author Comment

by:boatful
Comment Utility
Regarding the question from gwalters,
The reason for offering a batch download of graphic and htm files called at various times into various frames of the parent document (on the server) is to save time for frequent users of the site.  If you want to check out how it works, the URL is http://members.aol.com/beaconess/HEP/
I would love it if some of you would try the batch download option (called 'TURBO') and let me know how it works on your system!
0
 

Accepted Solution

by:
Intel earned 50 total points
Comment Utility
"<BASE HREF="c:\directory" will do just fine.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now