RE: dynamic meta tag and title app?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-11-18 at 17:40 -0800, Daevid Vincent wrote:

> ...right, because people can really use a site today without JS enabled...
> please. welcome to the 90's. I challenge you to turn off JS on pretty much
> any site with any amount of complexity. bah.
>  
> But yes, you could shove it in your <title> tags, but that's not always
> convenient. it depends on how you construct your page and the order of
> things, and how dynamic you need the title to be. 
> 
> 
>   _____  
> 
> From: Ashley Sheridan [mailto:ash@xxxxxxxxxxxxxxxxxxxx] 
> Sent: Wednesday, November 18, 2009 2:24 PM
> To: Daevid Vincent
> Cc: 'Jack S'; php-general@xxxxxxxxxxxxx
> Subject: RE:  dynamic meta tag and title app?
> 
> 
> Rather than use Javascript, which would limit your site to only those
> browsers that support Javascript, have it enabled and aren't using any
> plugins (like Noscript).
> 
> You could just use an array with the details in, set the type of page as one
> of the first things in your script, and then output what you need from that.
> 
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 
> 
> 	
> On Wed, 2009-11-18 at 14:18 -0800, Daevid Vincent wrote: 
> 
> I usually just use some JS in the footer.php of the page to go back and
> 
> change the title based upon other stuff, say the user's name or whatever:
> 
> 
> 
> <script language="JavaScript" type="text/javascript">
> 
> parent.document.title = "<?= PRODUCT_NAME ?> :: <?= $PAGE_TITLE ?>"; 
> 
> </script>
> 
> 
> 
> > -----Original Message-----
> 
> > From: Jack S [mailto:jacklistmail@xxxxxxxxx] 
> 
> > Sent: Wednesday, November 18, 2009 8:30 AM
> 
> > To: php-general@xxxxxxxxxxxxx
> 
> > Subject:  dynamic meta tag and title app?
> 
> > 
> 
> > Hello All,
> 
> > 
> 
> > Does anyone have a reference to a program that may be out there to
> 
> > help with using a single header.php for a site, but then dynamically
> 
> > loads different keywords , titles etc based on what page is including
> 
> > the header file?
> 
> > 
> 
> > Sample:
> 
> > If home page include it knows the title and other variables would be
> 
> > home, about us would be about etc.
> 
> > 
> 
> > -- 
> 
> > Thanks!
> 
> > Jack
> 
> > 
> 
> > -- 
> 
> > PHP General Mailing List (http://www.php.net/)
> 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> > 
> 
> 
> 
> 
> 
> 


Actually, you can make a site today that uses JAvascript to enhance
functionality. Something as simple as a title for a page shouldn't be
relying on Javascript to function! It's worth pointing out that in the
UK there is something called the Disability Discrimination Act, in which
it is an offense to unfairly penalise someone based on a disability.
Now, call me stupid, but how many speech or Braille browsers do you know
with Javascript support, and if there are any, do they support all the
Javascript that some people rely on to make their site accomplish basic
functionality

There is an aside to this as well. Javascript is not indexed by search
engines. The closest that even Google comes is to index URL's it find in
the Javascript, but it is not a full Javascript parser itself. How could
any search engine achieve this; the permutations of user interaction are
infinite. So, relying on Javascript to populate basic content means that
it will never be indexed. I mention this last part because most people
don't seem to give a damn about accessibility, but when threatened with
low search rankings they wail like harpies until their site is 'fixed'.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux