Closed Bug 801044 Opened 12 years ago Closed 10 years ago

Update /favicon.ico to the new "M"

Categories

(www.mozilla.org :: Pages & Content, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: icaaq, Unassigned)

References

Details

(Whiteboard: r=110231,122565)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/19.0 Firefox/19.0
Build ID: 20121011030552

Steps to reproduce:

1. Press Cmd+N to open a new browser window, then type https://www.mozilla.org/favicon.ico in the address bar and press Enter.


Actual results:

The firefox icon is displayed


Expected results:

the new mozilla icon should be displayed
Steven: Can you take a look? I believe that's hitting the PHP codebase.
(In reply to Anthony Ricaud (:rik) from comment #1)
> Steven: Can you take a look? I believe that's hitting the PHP codebase.

You're right. It's probably worth having a copy of the new favicon at /favicon.ico, as some browsers may ignore the <link rel="shortcut icon"> location and just look for favicon.ico in the root.

We could:

1. Use a symlink to point the favicon.ico to /media/img/favicon.ico on the server side, or a redirect? Or;

2. Move the favicon from /media/img/favicon.ico to the root, and update the link/rel to point to that.

I'm not sure how to host a resource in the route with bedrock.

Thoughts?
Just for the record, I noticed this when I view-sourced a page in google chrome

view-source:https://www.mozilla.org/en-US/
It should be an easy update, it's just sitting in the root of the mozilla.com svn repo:

http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/trunk/favicon.ico?view=log

Could also do a rewrite rule to the one in bedrock, and that might be the longer term solution for when (WHEN!) the PHP side goes away.
I went ahead and updated the file in svn (trunk) in rev 110231.

We should however still considering doing this in apache for the long term.
I just noticed this had not been merged to production yet. I can still see the old Firefox favicon https://www.mozilla.org/favicon.ico on PHP pages.

This will resolve Bug 683153, but all PHP pages including the Aurora/Beta landing pages and Firefox release notes will use this favicon. We may need a little tweak in header.inc.php as attached. This patch uses the same favicon and og:image as Bedrock, while https://www.mozilla.org/favicon.ico is still used on some pages that are not using the default header.
Attachment #828316 - Flags: review?(pmac)
Blocks: 683153
Status: UNCONFIRMED → NEW
Component: General → Legacy PHP system
Ever confirmed: true
To be clear, we need both r110231 and this patch.
Component: Legacy PHP system → Pages & Content
Comment on attachment 828316 [details] [diff] [review]
patch for header.inc.php

Review of attachment 828316 [details] [diff] [review]:
-----------------------------------------------------------------

Just a couple questions on /firefox/ url detection in the PHP.

::: includes/header.inc.php
@@ +41,4 @@
>  $fonts        = empty($fonts)        ? $default_fonts        : $fonts;
>  $styles       = empty($styles)       ? $default_styles       : $styles;
>  
> +if (strpos($_SERVER['REDIRECT_URL'], '/firefox/') === 0) {

why $_SERVER['REDIRECT_URL']? Wouldn't $_SERVER['PATH_INFO'] or $_SERVER['REQUEST_URI'] make more sense? Also /firefox/ might not be at position 0, there could be a locale in front of it.
Attachment #828316 - Flags: review?(pmac) → review-
Whiteboard: r=110231
(In reply to Paul McLanahan [:pmac] from comment #8)
> why $_SERVER['REDIRECT_URL']? Wouldn't $_SERVER['PATH_INFO'] or
> $_SERVER['REQUEST_URI'] make more sense? Also /firefox/ might not be at
> position 0, there could be a locale in front of it.

The REQUEST_URI has a locale, but the REDIRECT_URL doesn't. That's why.
Yeah, but it doesn't seem REDIRECT_URL is guaranteed to exist.

http://php.net/manual/en/reserved.variables.server.php

Perhaps using REQUEST_URI like so would be more robust:

if (strpos($_SERVER['REQUEST_URI'], '/firefox/') !== false)
New favicon merged to prod in r122532.
Status: NEW → ASSIGNED
REDIRECT_URL is used in other PHP scripts so it should be safe, but REQUEST_URI works well. Tested locally and committed to trunk at r122565.
Whiteboard: r=110231 → r=110231,122565
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Actually r122565 is not merged yet, but it's okay, the legacy PHP site will be gone.
Ahh, i looked at https://www.mozilla.org/favicon.ico and saw a "M" :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: