The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing metatags (DOM ready)
#1
Hi,

On a dynamical product page I want to change the metatags (SEO) with the actual product information.

I've made the following with jQuery but does this change make sense (for SEO) after DOM is ready? The page source is not showing the changed metatags, with Firebug it does.

Code:
$('meta[name=description]').attr('content', '<?php echo $description; ?>');
$('meta[name=keywords]').attr('content', '<?php echo $keywords; ?>');

... or ...

$('meta[name=description]').remove();
$('head').append( '<meta name="description" content="<?php echo $description; ?>">' );
    
$('meta[name=keywords]').remove();
$('head').append( '<meta name="keywords" content="<?php echo $keywords; ?>">' );

Is there a way (function) to change this after function get_header(); is started?

Regards, René
Reply


Messages In This Thread
Changing metatags (DOM ready) - by Rene - 2014-01-23, 20:21:45
RE: Changing metatags (DOM ready) - by Timbow - 2014-01-23, 21:26:03
RE: Changing metatags (DOM ready) - by Rene - 2014-01-23, 22:42:53
RE: Changing metatags (DOM ready) - by Carlos - 2014-01-24, 06:23:31
RE: Changing metatags (DOM ready) - by Rene - 2014-01-24, 19:28:30
RE: Changing metatags (DOM ready) - by Carlos - 2014-01-25, 00:47:13
RE: Changing metatags (DOM ready) - by shawn_a - 2014-01-25, 00:50:54
RE: Changing metatags (DOM ready) - by Rene - 2014-01-28, 23:49:01



Users browsing this thread: 1 Guest(s)