3

I'm a web developer and like to develop with a narrow browser window to somehow emulate how my website will look on a mobile phone. With pre-Yosemite-Safari it was possible to create such a narrow window that you could easily judge the look of your site on mobile. With Yosemite, this seems to be impossible. Any suggestions?

Picture from an iPhone.

Picture from an iPhone. I'd like to replicate this on the desktop. Note the line break after "Analytical"

Situation on the desktop after upgrading to Yosemite

Situation on the desktop after upgrading to Yosemite

1
  • You could install Xcode and use the iOS simulator that's built-in to run Safari. Oct 21 '14 at 18:34
4

You can enable "Develop" menu in Preferences > Advanced.

Then you can select choose the User Agent to be iPhone or whatever. enter image description here

And then resize the window appropriately:

enter image description here

Edit: This doesn't get around the minimum width for the window. Here is a workaround. Go to View > Show Sidebar. This pulls out the sidebar, which can be resized making the viewport smaller.

enter image description here

4
  • Maybe I put it wrong, but following your advice doesn't let me make the window narrower than without changing the user agent. Before Yosemite, I could make Safari almost half as narrow as now which came very close to the width of a Safari on an iPhone 5. On my iPhone, when I visit Wikipedia, the width only allows for a little bit more than "Today's featured article" to be displayed and the first line of today's article features only the two words "The Analytical" before the line break. Oct 21 '14 at 18:16
  • I see what you're saying. See my edit at the bottom.
    – Bowen
    Oct 21 '14 at 18:32
  • 1
    This workaround should do for now. I also submitted my issue to Apple in the hopes that they will change this behaviour back. Oct 21 '14 at 18:50
  • 1
    Doing it this way is a workaround anyways. To get more accurate rendering, you should run the iOS simulator and launch Safari from there or just test on your phone.
    – Bowen
    Oct 21 '14 at 18:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .