Safari

From Indie IT Wiki
Revision as of 10:30, 30 June 2020 by imported>Plittlefield
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The following are applicable to Safari running on Apple OS X.

HOWTO: VIEW:

Web Page Source Code

Safari > Preferences > Advanced > Enable Develop View > Develop > Show Page Source

HOWTO: DISABLE:

DNS Prefetching

If you find webpages are either loading slowly or corrupting try altering DNS prefetching to see if it makes a difference.

defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

To revert:

defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean true

Tool Tips

defaults write com.apple.Safari WebKitShowsURLsInToolTips 0

Password Saving

  • Open the Safari browser on your computer
  • Then click on the Safari tab in the top menu bar of your Mac and from the drop down menu click on Preferences.
  • On the next screen, click on the AutoFill tab and then Uncheck the option for User Names and Passwords.

HOWTO: ENABLE:

Debug Menu

defaults write com.apple.Safari IncludeDebugMenu 1

To revert the behaviour run again changing 1 to 0

Open All Links In New Tabs

In a terminal:

defaults write com.apple.Safari TargetedClicksCreateTabs -bool TRUE

To revert the behaviour run again changing YES to NO

Show Status Bar

defaults write com.apple.Safari ShowStatusBar -boolean true

To revert:

defaults write com.apple.Safari ShowStatusBar -boolean false

HOWTO: MODIFY:

History Limits

The history limits in Safari can either be set by the number of items or by time:

defaults write com.apple.Safari WebKitHistoryItemLimit 2000

or

defaults write com.apple.Safari WebKitHistoryAgeInDaysLimit 30

INFO:

Emptying Cache On OS X

See this article.

Keyboard Shortcuts

Jump To Top Or Bottom Of A Page

  • Top of page - Function+Left Arrow
  • Bottom of page - Function+Right Arrow

These shortcuts should works with most non-editable and some editable pages. For example, with the new Photos app and iTunes, along with Chrome, Firefox and Safari. Also when editing a document in LibreOffice but not when editing a page in Google Drive.

  • Top of page - Command+Up Arrow
  • Bottom of page - Command+Down Arrow

These shortcuts work with Chrome, Firefox and Safari and when editing a page in LibreOffice and Google Drive, but not work with Photos or iTunes.

Thanks to CNET

Safari Reader View

Use Safari's Reader View Automatically

Designing HTML for Safari Reader View

<html>
<head>
</head>
<body>
<main>
<h1>H1 Heading</h1>
<div>DIV Subtitle</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac diam at ipsum vulputate rhoncus vitae a turpis. Proin condimentum sollicitudin sem, vitae efficitur lectus congue ac.</p>
<p>Mauris rutrum odio lorem. Proin aliquam augue nec lectus finibus, id rhoncus libero luctus. Mauris finibus auctor scelerisque. Mauris in mauris eu est dictum faucibus. Suspendisse potenti. Aenean ex neque, laoreet eu leo at, tristique dapibus purus. Nunc aliquet neque enim, et laoreet ipsum egestas vitae.</p>
<h2>H2 Subheading</h2>
<p>Morbi auctor lobortis est, sit amet facilisis odio mattis ut. Nullam gravida, nisl nec facilisis mollis, urna nisi cursus ex, nec vehicula ligula leo eget odio. Phasellus suscipit erat ac justo eleifend gravida eu ut nisi. Cras vitae venenatis ante. Suspendisse at arcu vitae erat porta gravida. Nunc scelerisque felis turpis, ac blandit tellus commodo sed. Quisque augue neque, venenatis nec lorem id, volutpat ultrices leo. Nulla viverra imperdiet mattis.</p>
<h3>H3 Sub Subheading</h3>
<p>Quisque placerat, felis sed elementum aliquam, felis turpis aliquam est, a bibendum augue eros in mi. Praesent lacinia cursus neque. Vivamus interdum, lacus in pharetra pretium, sapien lacus pulvinar urna, a euismod libero neque id neque. Cras blandit, odio quis convallis ultrices, est nisl tristique risus, non faucibus sem orci sit amet orci. Morbi pulvinar sit amet sem eget dignissim. Quisque porta tristique purus. Donec scelerisque quis arcu vitae gravida.</p>
</main>
</body>
</html>