This morning I was trying to debug an issue where wordpress issues a 301 redirect to the exact same URL as initially requested. I'm sure I've tried to debug this before, but can't remember why I didn't fix it.
I soon realised why I hadn't fixed it - the 301 only occurred on the initial request for a page. Clearing cookies and cache didn't help, I would still get a 200. I thought that maybe WP was recording my IP and only sending a 301 if the IP hadn't already been recorded. But setting $_SERVER['REMOTE_ADDR']
to a different IP in wp.config.php didn't make any difference.
So, I have no way of knowing what is causing the initial 301 redirect, and no way to reproduce it. All I can think of is to leave my debugging code in the wordpress files, then try this again some other time and hope I can get some debug info to help me track the issue down.
Another issue was that Google Webmaster Tools reported that I was missing the 'updated' property from the hatom-entry microformat properties on some of my pages. In trying to fix this I tried a variety of solutions, testing them with Google's Rich snippets tester:
<span class="updated" title="2014-02-10T12:59+00:00">June 1st 2012</span>
Gives June 1st 2012 as the updated date (doesn't use the title value)
<span class="updated" title="2014-02-10T12:59+00:00"></span>
Gives updated not found
<abbr class="updated" title="2014-02-10T12:59+00:00"></abbr>
Gives 2014-02-10T12:59+00:00 as the updated date
<time class="updated" datetime="2014-02-10T12:59+00:00"></datetime>
Gives updated not found
<time class="updated" datetime="2014-02-10T12:59+00:00">June 1st 2012</datetime>
Gives June 1st 2012 as the updated date (doesn't use the datetime value)
<meta class="updated" content="2014-02-10T12:59+00:00" />
Gives updated not found
<meta name="updated" content="2014-02-10T12:59+00:00" />
Gives updated not found
So it seems like I will have to use abbr
rather than the more semantic time
, which is what the current spec uses: Microformats Datetime Design Pattern.
No comments:
Post a Comment