The Develop Menu

The Develop menu contains a set of tools to assist you in prototyping, debugging, and optimizing your website:

Changing the User Agent String

Every browser has a user agent string that identifies its type and version number. The browser sends this string to the server. Your website can also use JavaScript to read the user agent string to determine which version of a browser a user is running. You can choose what Safari reports as its user agent from the User Agent submenu.

This can be useful to quickly test your code to see if it is reacting to various user agents as you expect, without having to actually load the page in multiple versions of multiple browsers. The User Agent submenu is shown in Figure A-1.

Figure A-1  The type and version of various browsers in the User Agent submenu

You can choose the common versions of most popular browsers from the submenu. Note that the list includes the versions of Safari found on iPhone, iPad, and iPod touch.

The Other... menu item opens a sheet showing the default user agent string, which you can edit to any string you like.

Snippet Editor

Snippet Editor provides an interactive sandbox for previewing HTML and CSS, as shown in Figure A-2.

Figure A-2  Snippet Editor can help you isolate problems with your markup