07-30-2003, 07:08 PM
I have a standard menu bar, which I want to insert into everypage. I thought this should be faster because, the browser can fetch the page from cache, everytime the user navigates to a newpage.
How do I insert the page say sidebar.htm into the mainpage say index.htm
07-30-2003, 07:56 PM
The best way would be to use a server side include. You should be able to accomplish it with shtml, try searching google for a good tutorial on the subject.
If you are already using PHP or ASP in your pages, then you can just do a include through them.
Agree, but it won't affect caching. The browser gets the page as a whole.
07-30-2003, 10:16 PM
The only other way would be to use frames. *shutters*
07-31-2003, 02:33 AM
07-31-2003, 03:01 AM
It'll work, but I concentrate on making my pages viewable no matter what the situation is. If you can't find a good and free SSI host, get your own server. Aprelium's Abyss server is great for that. That's where my username came from :)
I don't see how the cahing is such a big deal. Images are cached anyway and how many bytes of text can there be in a menu?
07-31-2003, 03:24 AM
cahing is a big deal.
Many people are reluctant to cah, understandably so. Don't make light of their concerns.
Once again... IMAGES are BIG compared to TEXT. IMAGES are already CACHED. That's why it doesn't matter if you can cache the whole menu or not.
This whole thread is about 1500 bytes of TEXT. The same size as ONE of the BUTTONS on this page. That will be chached. Because images are cahed. See? :cool:
07-31-2003, 05:52 AM
How about - core navigation through a <ul> tree of a links, and that's accessible to all, whatever they support or have enabled; then transform the list with cacheable- CSS and Javsacript, to make a dynamic navbar.
Peddling my list menu again blatantly ... but it is the new way :) Check it out - http://www.brothercake.com/scripts/listmenu/
nb - the CSS and script won't cache if it's directly in the source like that; that's just an eg; you need to put it in external files.
If you want search engines to properly index your site then you also need to create a sitemap page full of normal HTML links. These links point back to every page of the site. You will also need to put a normal HTML link on every page of the site pointing to the sitemap page.
08-01-2003, 09:09 AM
Posted by cheesebagpipe:
Oh! Sorry. I'm always assuming people are either answering the original question or the guy just above if it doesn't say anything else. Sometimes they aren't.
08-01-2003, 05:25 PM
Cheesebagpipe is saying that you can use external .js files to write out links using the document.write function.Always glad to know what I was saying.
Senthil:I have a standard menu bar, which I want to insert into everypage.
08-01-2003, 06:48 PM
I love caching though because it's great to reduce server load, but then again, it depends on how much you're updating. For a weblog type of site, you could set Expires to be 6 hours (which is my setup). Plus, when I'm rebooting my computer, they won't see connection errors because the page will be in cache. It's weird how they pronounce it "cash". I always thought they pronounced it "catchy", because it "catches" things from servers :D
For newbies: Such HTML code is still not search engine friendly.