Author |
Message |
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 4:32 pm (21 years, 11 months ago) |
|
This one may seem a little strange but here we go,
I include my menubar in each of my pages, but I can't have graphics, as I have to put <img src="http://www.mysite.com/img/img.gif"> for it to work in each page, the trouble with this is, that every time you change page, it reloads the graphics, rather than caching them, as it does if I use relative paths, but I can't use relative paths, because www.mysite.com, with an include would be just <img src="imagename.gif">, but this would be wrong, if I had a file in a sub-directory, and the graphic wouldn't show up.
Any Ideas?
Thanks |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun May 26, 2002 4:40 pm (21 years, 11 months ago) |
|
Use Code: | <img src="/img/img.gif"> |
|
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 5:08 pm (21 years, 11 months ago) |
|
Daniel wrote: | Use Code: | <img src="/img/img.gif"> |
|
Grrrrrr, I design professional sites and I didn't know you could do that!!!! I thought that ment change directory rather than from the root, but then again, it shows how dense I am! |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun May 26, 2002 5:57 pm (21 years, 11 months ago) |
|
Did you know you could use links like that? 'Cause we've used that kind of link all over this site! |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 6:16 pm (21 years, 11 months ago) |
|
Daniel wrote: | Did you know you could use links like that? 'Cause we've used that kind of link all over this site! |
I know, I just had a look, I always thought "/dir/" was the same as dir/ |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun May 26, 2002 6:24 pm (21 years, 11 months ago) |
|
I wouldn't waste my time adding all those slashes if they weren't needed! And how did you think a link from /tutorials/ to /links/ would work? Wouldn't you have thought that it linked to /tutorials/links/? That wouldn't make sense! |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 6:49 pm (21 years, 11 months ago) |
|
Daniel wrote: | I wouldn't waste my time adding all those slashes if they weren't needed! And how did you think a link from /tutorials/ to /links/ would work? Wouldn't you have thought that it linked to /tutorials/links/? That wouldn't make sense! |
I would do ../links/ |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun May 26, 2002 6:51 pm (21 years, 11 months ago) |
|
Yes, but didn't you wonder how OUR links worked? (or those on other sites who use this technique) |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 7:01 pm (21 years, 11 months ago) |
|
Daniel wrote: | Yes, but didn't you wonder how OUR links worked? (or those on other sites who use this technique) | No, because I never looked at your source until you pointed it out above, I just always thought it was like how I outlined above, I'm thick for not knowing it I know, but thats just the way it is, as I usually use text links so it's not a problem. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun May 26, 2002 7:02 pm (21 years, 11 months ago) |
|
Why wouldn't it be a problem? |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 7:05 pm (21 years, 11 months ago) |
|
Because I just used URL's, the difference with images, is if you call them with URL's they are not cached, so every page change involves them being reloaded, if you call them locally they are cached. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun May 26, 2002 7:07 pm (21 years, 11 months ago) |
|
I wonder why... It's a little stupid IMO. If the browser is going to cache pages with absolute URL's, why doesn't it cache images... |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun May 26, 2002 7:15 pm (21 years, 11 months ago) |
|
Daniel wrote: | I wonder why... It's a little stupid IMO. If the browser is going to cache pages with absolute URL's, why doesn't it cache images... |
Well it doesn't in Internet Explorer 6.0 or Internet Explorer 6.0SP1 Anyway! |
|
|
|
|
|