12

When setting meta name='viewport' content='target-densitydpi=device-dpi', the Android browser and Opera Mobile treats a CSS pixel as a device pixel on my device, leaving my stylesheets unmolested.

Is there any equivalent feature that works in Safari on the iPhone?

On my already mobile-friendly, high-DPI-optimized, media-query-powered web application, I'd really appreciate if the browser left my stylesheets alone.

(My full viewport declaration looks like this: meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no; target-densitydpi=device-dpi')

Community
  • 1
  • 1
Wilhelm
  • 153
  • 1
  • 1
  • 5

3 Answers3

4

check this link my be that's help you https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4

You can write like this

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

check this link also https://www.davidbcalhoun.com/2010/the-viewport-metatag-mobile-web-part-1/

Webwoman
  • 10,196
  • 12
  • 43
  • 87
sandeep
  • 91,313
  • 23
  • 137
  • 155
-1

safari support viewport and its attributes but not target-densitydpi. please refer this link https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW1

Cœur
  • 37,241
  • 25
  • 195
  • 267
ianwang
  • 59
  • 1
  • 5
-1

It seems that there's no target-densitydpi in safari. For what contents in Viewport of safari, look Configuring the Viewport.

Cœur
  • 37,241
  • 25
  • 195
  • 267
xhlwill
  • 399
  • 1
  • 5
  • 20