Detect iPad and iPhone in web browsers

In this short post, I will share a web page redirection code for users of iPad, iPhone or ipod who have no access to Adobe Flash media.

In the first week of November 2011, Adobe announced that it will cease developing its Flash Player plug-in for mobile browsers. The next most affected devices(besides the iPad, iPod, iPhone) are those based on Android OS.

Below is simple javascript that needs to be inserted into the top section of your web page (between the and tags) to re-direct those users to an alternative page.

<!--ipad redirect-->
<script language=javascript>
if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)
|| (navigator.userAgent.indexOf('iPad') != -1)) {
document.location = "http://www.yourdomain.com/directory/index1.html";
}
</script>

In this example, /directory/ is optional (in case that your site or iPad friedly version of your site resides in another directory) and index1.html is an alternative index.html that does not contain any Flash code. Index1.html is essentially a copy of the index.html where the Flash part is replaced with JQuery or html5 code to display the original slides or movie. It is where the visitor will be re-directed to.

Read more.. 

mpatek October 9, 2011 Filed in: → Code No Responses

Making of this site

Sometime in June 2011, I finally realized that I need to make a new home for all my photos, margin notes, web links, and code that I have created over the years.  Repeatedly, I found myself jotting down notes for image sizes, Lightroom settings, Photoshop configuration, camera settings, flash presets, … Overall, too many things to remember. I also became unhappy with color management settings in the Adobe Flash, which rarely worked for me and which rendered my images too saturated on wide gamut monitors.

In the late July, a plan was born – build a site for the photos and other content that would keep them in one place with confidence in the original color quality. 

mpatek September 11, 2011 Filed in: → Uncategorized No Responses