Catagories

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ... 1,285 views

iTunes web site and Google Chrome on Microsoft Windows – Part II

Share |

Ok, my first attempt (see my previous post on this) at this was a little “programmy” and “hacky“. It also appears that Apple changed the itmsCheck.js JavaScript code and no longer set the iTunesPresent cookie as they did before.  Apple still doesn’t recognize Google Chrome as one of the browsers or platforms on which they will automatically attempt to load iTunes from web pages.  To overcome this issue I searched for a Google Chrome extension that could be configured to use a Safari Macintosh User-Agent string whenever browsing a web page in the Apple.com domain.  I found User-Agent Switcher for Chrome which did the trick!  Below is a screenshot of the configuration screen for User-Agent Switcher.  I added a setting telling the software to use the pre-configured Mac Safari user-agent string for any web page in the Apple.com domain.

I am now able to automatically have Chrome load iTunes whenever I click on iTunes Preview link such as the one below.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ... 3,064 views

iTunes web site and Google Chrome on Microsoft Windows

Share |

Here’s proof that Apple’s iTunes web site doesn’t natively recognize Google Chrome for automatically launching the iTunes application from the iTunes web site.  Below is a screen capture of the source code used by the iTunes web site to detect the presence of the iTunes software on the PC accessing the iTunes web site.  The JavaScript function used to detect iTunes is called “iTunesDetected” and will only return TRUE if any of the following are true:

the browser’s user agent string contains the word “Macintosh” the browser is Internet Explorer and the iTunes ActiveX component installed the browser is Firefox and the iTunes Mozilla plugin is installed an iTunes cookie named “iTunesPresent” set to true in the domain of the Apple web site visiting or in “.apple.com”

iTunes web site JavaScript that excludes Google Chrome

The $64 question now is what’s the best way to get the “iTunesPresent” cookie set in domain “.apple.com”.

My first thought was to configure Chrome to use a user agent string containing “Macintosh” and then launch iTunes from the iTunes web site once thereby setting the cookie.

Chrome using Macintosh/Safari User Agent String

I was perplexed when this didn’t work.  Using [...]