different window title and browser tab title

S

soonic

Hi

I'm looking over the internet, but I can't find (I thought it's a common
subject). I need to put one title at the top of the browser and a title
of the current page in a browser's tab. That means they're gonna be
different, so the <title> tag doesn't work for me. It makes title the
same in both cases and I don't want that. How to do it?

s.
 
J

Jonathan N. Little

soonic said:
Hi

I'm looking over the internet, but I can't find (I thought it's a common
subject). I need to put one title at the top of the browser and a title
of the current page in a browser's tab. That means they're gonna be
different, so the <title> tag doesn't work for me. It makes title the
same in both cases and I don't want that. How to do it?

AFAIK you cannot, the window title and *active* tab title is
synchronized intentionally to indicate which tab you are looking at.
Prevents mischief, remember the days when IE could be hacked with
overlays over the IE's browser chrome? e.g., Fake menu and address bars...
 
D

dorayme

Jonathan N. Little said:
AFAIK you cannot, the window title and *active* tab title is
synchronized intentionally to indicate which tab you are looking at.
Prevents mischief, remember the days when IE could be hacked with
overlays over the IE's browser chrome? e.g., Fake menu and address bars...

I am sure you are right. However, if you open one site but have
different parts of it open in different tabs, it would be nice
for the tabs to indicate the parts (a part being a section of the
website).

At the moment, the only thing I can think of would be for the
author to name the titles slightly differently for the different
sections like "Amex Company" for the home page and "Amex Company
Contacts" for the contacts page(s). But the most relevant or
significant part of it needs to be at the front for a tab because
they are easily truncated, not a criterion ideal for the title in
the window bar at the top.
 
J

Jonathan N. Little

dorayme said:
I am sure you are right. However, if you open one site but have
different parts of it open in different tabs, it would be nice
for the tabs to indicate the parts (a part being a section of the
website).

If the sections are on the same page or have the same title, how is the
browser supposed to indicate these parts?
At the moment, the only thing I can think of would be for the
author to name the titles slightly differently for the different
sections like "Amex Company" for the home page and "Amex Company
Contacts" for the contacts page(s). But the most relevant or
significant part of it needs to be at the front for a tab because
they are easily truncated, not a criterion ideal for the title in
the window bar at the top.

If these are different HTML documents then the author can solve the
problem by using different titles for each document. That good practice
anyway.
 
D

dorayme

Jonathan N. Little said:
If the sections are on the same page or have the same title, how is the
browser supposed to indicate these parts?

If the home page section is on the contacts page, all is lost,
there is no hope, we are all doomed. But why not think
optimistically about making a website with planning and foresight
and all the furniture for sale in the furniture pages, all the
electronic goods in the electronic pages and so on. Remind me not
to be in the same section of hell as you, you will only depress
me further by your reasonable negativity. said:
If these are different HTML documents then the author can solve the
problem by using different titles for each document. That good practice
anyway.

You don't say! What did I say?
 
S

soonic

website).
At the moment, the only thing I can think of would be for the
author to name the titles slightly differently for the different
sections like "Amex Company" for the home page and "Amex Company
Contacts" for the contacts page(s). But the most relevant or
significant part of it needs to be at the front for a tab because
they are easily truncated, not a criterion ideal for the title in
the window bar at the top.

OK. I'm kind of confused if it's possible or not. I made a small website
(http://klimat.icm.edu.pl), all sections are divided to separate files.
If you look at this (no English version, but it doesn't matter in this
case), on the left in the menu I want each when it's clicked to view in
browser's tab, but the title in the banner I'd like to have at the top
of the browser as a constant title. So, is it possible, and how?
 
J

Jonathan N. Little

soonic said:
OK. I'm kind of confused if it's possible or not. I made a small website
(http://klimat.icm.edu.pl), all sections are divided to separate files.
If you look at this (no English version, but it doesn't matter in this
case), on the left in the menu I want each when it's clicked to view in
browser's tab, but the title in the banner I'd like to have at the top
of the browser as a constant title. So, is it possible, and how?


It looks like you are using some framework or template system that only
changes the content area. What you need to do is for each of your
"sections": Wprowadzenie, Klimat Obserwowany, Modele Klimatu,
Scenariusze Emisji, Projekcje Klimatu; pass a parameter or have some db
lookup that changes title, e.g:


<html>
<head>
<title><?php echo $theTitleForThisSection; ?></title>
</head>
<body>...
 
S

soonic

It looks like you are using some framework or template system that only
changes the content area. What you need to do is for each of your
"sections": Wprowadzenie, Klimat Obserwowany, Modele Klimatu,
Scenariusze Emisji, Projekcje Klimatu; pass a parameter or have some db
lookup that changes title, e.g:


<html>
<head>
<title><?php echo $theTitleForThisSection; ?></title>
</head>
<body>...

I think this is not exactly what I need. Of course it will change the
title, but in both cases (browser's tab and at the top of the window).
Thank you for the clue, I'll try to do that if there isn't any way to
change only browser's tab.
 
D

dorayme

[QUOTE="soonic said:
It looks like you are using some framework or template system that only
changes the content area. What you need to do is for each of your
"sections": Wprowadzenie, Klimat Obserwowany, Modele Klimatu,
Scenariusze Emisji, Projekcje Klimatu; pass a parameter or have some db
lookup that changes title, e.g:


<html>
<head>
<title><?php echo $theTitleForThisSection; ?></title>
</head>
<body>...

I think this is not exactly what I need. Of course it will change the
title, but in both cases (browser's tab and at the top of the window).
Thank you for the clue, I'll try to do that if there isn't any way to
change only browser's tab.[/QUOTE]

There isn't, that is what we have been saying, Jonathan's
suggestion is probably as good as it gets. My point before was
that in browsers tabs, the title gets truncated (because of
crowding, there isn't the space like in the bar at the top of a
window) and you only see the beginning part. So, the tricky thing
is to make a title for each page that doubles for usefulness in
both, the beginning being important in tabs, not so important for
the top window bar.
 
A

Allodoxaphobia

I think this is not exactly what I need. Of course it will change the
title, but in both cases (browser's tab and at the top of the window).

Just what browser tab are you talking about?
Firefox's browser tab?
Opera's browser tab?
Chrome's browser tab?
konqueror's browser tab?
Epiphany's browser tab?
Safari's browser tab?
....
(I believe there are a few other browsers I haven't listed...)

What makes you believe there is some 'standards committee' that
specifies the way browsers handle their window tags?

Get real.
 
N

Neil Gould

Allodoxaphobia said:
Just what browser tab are you talking about?
Firefox's browser tab?
Opera's browser tab?
Chrome's browser tab?
konqueror's browser tab?
Epiphany's browser tab?
Safari's browser tab?
....
(I believe there are a few other browsers I haven't listed...)
One or two come to mind... 8-D
What makes you believe there is some 'standards committee' that
specifies the way browsers handle their window tags?
What matters is where the information would come from to populate the tab,
and since there isn't a unique element for tabs, so most browsers do "the
smart thing" and use the <TITLE> element. Therin lies the rub.
 
S

soonic

W dniu 2011-07-27 13:49, soonic pisze:
I think this is not exactly what I need. Of course it will change the
title, but in both cases (browser's tab and at the top of the window).
Thank you for the clue, I'll try to do that if there isn't any way to
change only browser's tab.


Well, I changed as you suggested with the parameter. Works fine and I
leave it as it is (no other choice :)
thx

s.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top