Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Safari cannot connect to localhost but can connect to 127.0.0.1

For some reason, all of a sudden my Safari cannot connect to localhost because it cannot establish a secure connection. However, it is able to connect 127.0.0.1. Oddly enough Firefox is able to connect to localhost and 127.0.0.1. I believe it's some sort of certificate issue, but that's just a guess. What can I do so I can connect to localhost on Safari again?

The Kid From Yesterday's user avatar

  • I feel like you're leaving out a lot of key details. What kind of webserver (or other software package with its own integrated web service) have you been running on your machine? Have you perhaps been experimenting with HSTS or HPKP security on a website you're developing on localhost? –  Spiff Commented Feb 18, 2017 at 19:40
  • I'm running MAMP. I recently upgraded from MAMP 3.5.x to the latest version. I did uninstall MAMP Pro which did some edits to the host file. I haven't been experimenting with either of those things. I did install a Docker image of cozy.io last night and removed it promptly. That was the first time I had some secure connection issues though it was able to be bypassed by adding an exception. –  The Kid From Yesterday Commented Feb 18, 2017 at 20:46

2 Answers 2

You probably installed something on your machine that acts as a web server and uses HTTP Strict Transport Security (HSTS) to make sure your browser knows it should always use TLS (HTTPS) when connecting. Then you connected to it by pointing your browser at localhost, and now your browser believes it should only use HTTPS when connecting to localhost.

Apparently Safari stores its list of HSTS websites in ~/Library/Cookies/HSTS.plist , so you should be able to fix it by editing that plist file to remove the entry for localhost, or by deleting that plist altogether if you don't mind resetting the whole list of sites Safari has learned to strictly require TLS for.

Spiff's user avatar

  • I think this is the solution, but the only problem is that it keeps adding the localhost entry after I start Safari. Even if I delete the plist. –  The Kid From Yesterday Commented Feb 18, 2017 at 23:12
  • Deleted this plist and restarted and this worked thank you so much! –  The Kid From Yesterday Commented Feb 18, 2017 at 23:28

Note: This might not solve everyone's problem.

I am a MAMP user and noticed in my hosts settings that 127.0.0.1 localhost was removed somehow. Type sudo nano /etc/hosts , type in your password, and then add these default lines back:

127.0.0.1 localhost ::1 localhost

This worked for me. I hope others find it helpful.

Brian's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged mac localhost safari ..

  • The Overflow Blog
  • Detecting errors in AI-generated code
  • Where developers feel AI coding tools are working—and where they’re missing...
  • Featured on Meta
  • User activation: Learnings and opportunities
  • Preventing unauthorized automated access to the network

Hot Network Questions

  • What is a Locus?
  • Could a Project like Orion be built today with non nuclear weapons?
  • How to understand Mary and Joseph fleeing to Egypt in light of Deuteronomy 17:16?
  • In the absence of an agreement addressing the issue, is there any law giving a university copyright in an undergraduate student's class paper?
  • How can moving observer explain non-simultaneity?
  • VLA configuration locations
  • Disclaimer of Warranty regarding wording of representation, undertaking, warranties and gurantees
  • Batch Apex: Why is Salesforce giving me an "Internal Salesforce.com Error" when I try to execute a batchable inner class?
  • If I was ever deported, would it only be to my country of citizenship? Or can I arrange something else?
  • Cultivator Colossus and bounce lands
  • \usepackage[<language>]{babel} or \babelprovide{<language>}? Why?
  • How to print a Windows relative path from a Windows .lnk file as a Linux relative path?
  • What determines the resistance with which MOSFETs fail short?
  • Tic-tac-toe encode them all
  • Why can’t acceleration in GR be defined the same way as in EM?
  • How was the year spoken in late 1800s England?
  • Is p→p a theorem in intuitionistic logic?
  • Is the Left Multiplication Operator Decomposable?
  • Does AI use lots of water?
  • Can I stack deck floor frames on top of each other?
  • Enhancing my RSA implement in Python
  • Is a private third party allowed to take things to court?
  • Is there any reason _not_ to add a flyback diode?
  • How do I link a heading containing spaces in Markdown?

safari not opening localhost

How to Fix the “Safari Can’t Establish a Secure Connection to the Server” Error (6 Solutions)

When you’re browsing the web, the last thing you want is to run into an error message. If you’re a macOS user, one of the issues you might come across is: “Safari can’t establish a secure connection to the server” error.

While it may seem intimidating at first, this is a relatively common problem with a few simple solutions. All it usually takes is a little bit of troubleshooting before you’re able to effectively (and safely) access the site.

This post will explain what this Safari error message is and some of its common causes. Then we’ll provide you with six easy ways to fix the problem.

Let’s get started!

What’s the “Safari Can’t Establish a Secure Connection to the Server” Error?

Some of the best features of Mac devices are their built-in security settings . Apple has created an experience designed to keep you and your device safe, especially while browsing the web.

This is why its native browser, Safari, will sometimes prevent you from accessing a website that it doesn’t deem as secure. When this happens, you’ll likely see an error message that says, “Safari can’t establish a secure connection to the server.”

A screenshot of the “Safari can’t establish a secure connection to the server” error.

The specific wording of the error may vary. For example, as you can see in the image above, you might also come across a notification letting you know that “Safari Can’t Open the Page.”

In a nutshell, this error message means that the browser doesn’t trust the encrypted data on the site. Alternatively, Safari could not access and verify the information successfully. For example, this might happen when a site doesn’t have a Secure Sockets Layer (SSL) certificate  properly configured.

Using SSL and Secure Shell Access (SSH)  is critical for websites today. This is especially true when you have a site that handles sensitive customer data, such as a WooCommerce store .

However, if you know the site that you’re accessing is secure, the problem is likely with Safari. Many people experience this error message when accessing popular websites, such as Facebook, YouTube, and Google.

What Causes “Safari Can’t Establish a Secure Connection to the Server” Error?

There are many different reasons you might be seeing this error message. As we mentioned, the main explanation is that Safari can’t verify that the website you’re trying to access is secure enough to protect your data.

However, it’s essential to understand  why it deems the site unsecured to know how to resolve it. Sometimes, you may not know what the culprit is until you try troubleshooting it.

With that said, there are a handful of common causes behind the “Safari can’t establish a secure connection” message. For example, the issue may be attributed to a third-party extension or add-on you have installed on your browser. It could be something as simple as having outdated cache data. However, it could be a more complicated problem, such as the Internet Protocol (IP) version you’re using.

How To Fix the “Safari Can’t Establish a Secure Connection to the Server” Error (6 Solutions)

Now that we understand more about the issue and its potential causes, it’s time to look at how to fix it. Below are six solutions you can use to resolve the “Safari can’t establish a secure connection” error.

1. Clear Your Browser Data

When you visit websites, Safari will store some of the information in the browser cache and cookies. If this data includes outdated details relating to the site’s SSL or encryption , it can be the reason you see the error message.

Therefore, one of the quickest and simplest methods you can use to resolve this error is to clear your browser cache . To do that in Safari, you can start by opening up the browser.

Next, click on Preferences  > Privacy , then select Remove All Website Data .

Clearing the browser cache in Safari.

After it finishes loading (it may take a minute or two), you can decide which websites to clear the data from. For example, you can select them all or simply the one you’re having trouble accessing.

When done, click on the Done  button at the bottom of the screen.

Next, to clear your entire browsing history, you can navigate to  Safari  > History  > Clear History .

Clearing your entire browsing history in Safari.

When finished, try revisiting the site that was showing the error message. If it’s still there, you can move on to the next solution.

2. Check Your Device’s Date and Time

While it may seem odd, sometimes having the incorrect date and time on your Mac device can cause some issues within Safari. Therefore, it’s essential to ensure that yours is set to the correct time zone and date.

To get started, you can click on the Apple icon, then navigate to System Preferences  > Date & Time .

Find the date and time option in preferences

From here, you can verify that you’re using the right date and time.

Verify you are using the right date and time.

Under the  Time Zone tab, you can also enable your device to sync to your current location automatically. When you’re done, you can exit the window and try re-accessing the site.

3. Change Your DNS Settings

If the error is still there, you might want to check out your Domain Name Server (DNS)  settings. In a nutshell, your DNS acts like a phonebook that allows devices and sites to reach each other. Safari uses your DNS settings to connect to websites.

If there are issues with your DNS settings, it might be why you see the “Safari can’t establish a secure connection to the server” message. To see if this is the case (and resolve it), you can try changing your DNS addresses. For example, you could use Google’s Public DNS.

To get started, browse to Apple  >  System Preferences  > Network .

Find the network option in preferences

From this window, select your connection, then click on the Advanced tab, followed by DNS . Next, click on the (+) icon next to IPv4 or IPv6 addresses .

Click on the DNS tab

Then you can enter the new DNS IP addresses. For example, if you want to use Google’s Public DNS, you can enter “8.8.8.8” and “8.8.4.4”.

Enter the new DNS IP addresses.

When you’re finished, click on the OK  button. Recheck the website to see if this process removed the error message.

4. Uninstall or Disable Your Browser Extensions

As we mentioned earlier, an extension or add-on in your browser may be conflicting with Safari’s ability to connect to a site securely. Sometimes, this is common with anti-virus programs and security-related extensions.

Therefore, the next step is to try deactivating all your browser extensions. To do this, you can open Safari, then navigate to Preferences  and click on the Extensions  tab.

Try disabling browser extensions

A list of your extensions will display in the left column. You can click on the checkmark next to the add-on name to disable it.

Once you’re done, try revisiting the site. If this solves the problem, you’ll need to pinpoint which extension was to blame. You can do this by systematically enabling each add-on and visiting the site after each time.

5. Disable IPv6

Internet Protocol (IP) is a set of rules that controls how data moves across the internet. IPv6 is a newer protocol version. However, some websites still use the older version, IPv4. If this is the case, it might be why you’re running into the “Safari can’t establish a secure connection” message.

Therefore, you can try disabling IPv6 on your network. To do so, navigate to System Preferences > Network once again, then click on your network connection, followed by the Advanced  button.

Under the TC P/IP tab, click on the dropdown menu under  Configure IPv6  and select Manually .

Configure IPv6 and select Manually

When you’re done, click on the OK button. This should resolve the issue if IPv6 were the problem. If not, there’s one last solution you can try.

6. Make Sure Keychain Trusts the Certificate

Earlier, we mentioned how Safari could sometimes present the connection error message if it cannot verify the validity of the site’s SSL certificate. If this is the case, you can bypass the issue by configuring settings in your macOS’s Keychain Access app.

Keychain Access is the application that stores your passwords , account details, and application certificates. It keeps your data secure and can control which sites are trusted by your device. As such, you can tell it to accept a site’s SSL certificate moving forward.

To do this, you can go to the website showing the error message, then click on the lock icon to the left of the address bar, followed by View/Show Certificate  > Details .

Check if Keychain trusts the certificate in preferences

With the Details panel expanded, click Control + Space Bar . A Spotlight Search bar will appear in the top right-hand corner of your screen. Enter “Keychain” in the search field.

Next, on the left, click on System Roots . Search for the website’s certificate. Once you locate it, go to the Trust section. Then click on the dropdown menu next to When using this certificate section  and select Always trust :

Select the Always Trust option under certificates

That’s it! You should now be able to access the site successfully.

Trying to access a website only to be met with an error message can be highly frustrating. While Safari is simply trying to keep your data protected, sometimes it can get misconfigured. In this case, the browser may unnecessarily present a security notification such as “Safari can’t establish a secure connection.”

There are six methods you can use to fix this issue when it happens:

  • Clear your browser data, including the cache and cookies.
  • Check your device’s data and time.
  • Change your DNS settings.
  • Uninstall or disable your browser extensions and add-ons.
  • Disable IPv6.
  • Make sure Keychain trusts the SSL certificate.

Do you have any questions about fixing the Safari secure connection issue? Let us know in the comments section below!

safari not opening localhost

Senior Editor at Kinsta, WordPress Web Developer, and Content Writer. Outside of all things WordPress, I enjoy the beach, golf, and movies. I also have tall people problems.

Related Articles and Topics

safari not opening localhost

Powerful Managed WordPress Hosting

safari not opening localhost

6 Most Secure Browsers to Stay Safe and Protect Your Privacy

  • Application Development
  • Digital Marketing
  • Local Development

Gravatar for this comment's author

Tried as much of this as possible, and Safari still doesn’t work. Couldn’t try some things, because I’m running it on a PC, and not on a Mac.

However, I am able to access all sites with FireFox, so teh problem does seem to be with Safari. Too bad.

Gravatar for this comment's author

Thank you so much!!! My date was wrong and it fixed the issue thank u ❤️👍

Gravatar for this comment's author

I tried all six of the fixes you offered. All seemed to work – except I did not fully grasp the extensions one. Also cannot get to the lock on the website I’m trying to open (gov.uk) because that website won’t open so no lock is shown.

Gravatar for this comment's author

Fixing date and time worked for me

Gravatar for this comment's author

Great information. I went through every step and got to the SSl certificate section. There is no certificate for the site I’m attempting to visit. Safari will not allow me to visit many sites. So it isn’t just the one site.

Leave a Reply Cancel reply

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

Your email address will not be published. Required fields are marked *

By submitting this form: You agree to the processing of the submitted personal data in accordance with Kinsta's Privacy Policy , including the transfer of data to the United States.

You also agree to receive information from Kinsta related to our services, events, and promotions. You may unsubscribe at any time by following the instructions in the communications received.

search icon

When asked to make some types of connection to localhost or 127.0.0.1, Safari may ignore any configured proxy. This may cause Safari to not fetch traffic via Sauce Connect, causing tests to fail.

To prevent this, use a different hostname for the system under test. You can either use the existing hostname of the system, or set a new hostname just for testing purposes. This does not need to be a 'real' hostname; you can make up a name and have it resolve to 127.0.0.1, and it'll work fine.

  • This article from Microsoft describes how to add a hostname on Windows.
  • This article from OS X Daily describes how to add a hostname on Mac.
  • This article from LinuxIssues.org describes how to add a hostname on Linux.

For instance, if you wanted to use the hostname  localtest.dev, you would add this to your host file: 

If you're using a test runner, you'll also need to configure it to use the new hostname instead of localhost. Check out our sample test runner setups for more information on how to configure your test runner to work with Sauce Labs. 

Issues Connecting to Localhost with Safari

Jan 3, 2024 • knowledge, information.

  • Sauce DevOps Test Toolchain
  • Sauce Cross-Browser
  • Sauce Mobile
  • Sauce Orchestrate
  • Sauce Low-Code
  • Sauce Error Reporting
  • Sauce API Quality
  • Sauce Visual
  • Sauce Performance
  • Sauce Insights
  • Integrations & plugins
  • Supported browsers and devices
  • Platform configurator
  • Resources by topic
  • Documentation
  • Systems status
  • Terms of Service
  • Privacy Policy

You can make a difference in the Apple Support Community!

When you  sign up with your Apple ID , you can provide valuable feedback to other community members by  upvoting helpful replies and User Tips .

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

goudkamp74

Safari forcing HTTPS for some HTTP only sites - SOLVED

If, in Safari, a http:// site is getting automatically redirected to https:// and you get an error it cannot open the page, it's due to HSTS. You cannot prevent that from happening with the regular Safari or by deleting the ~/Library/Cookies/HSTS.plist file. Just doesn't work.

EXCEPT if you download the Safari Technology Preview version where you can delete the HSTS Policy cookie for said site. And then it works! Your 'normal' Safari version will pick this up too, in case you don't want to continue using the preview version.

safari not opening localhost

Was driving me crazy.

Note: Chrome and Firefox are not affected by this behavior.

Posted on Jan 23, 2019 1:11 AM

Morungos

Posted on May 3, 2019 8:15 AM

This now seems to be in the regular Safari as of 10.14.4 at least. It was driving me crazy, as I'd managed to get this set for localhost. However, just selecting localhost and deleting all its cookies worked fine in the regular Safari (12.1)/

Similar questions

  • Safari changes website URLs automatically to HTTPS, even when you type HTTP . This causes "Safari can't open this page.." message. I'm trying to access test websites that don't have an SSL certificate (http://), but cannot because Safari is automatically changing the url entered in the search field to HTTPS (https://). This started happening about 3 weeks ago and I cannot find anything in the preferences. I have been using Google chrome to bypass this, but want to use Safari, so can test these sites in the browser Has anyone else had this issue? Can anyone help? 1573 1
  • Safari cannot open http pages Hello, I found that safari Version 14.0 (15610.1.28.1.9, 15610) is not able to open HTTP pages, it keeps loading forever. Only HTTPS pages are opened . I am using macOS Catlina 10.15.6 Thanks 775 3
  • Safari not able to open HTTP pages Hello, Safari Version 15.4 (15613.1.17.1.13, 15613) seems not able to open HTTP, it keeps loading forever. Only HTTPS pages are opened . I am using macOS Catlina 10.15.7 Thanks 836 2

Loading page content

Page content loaded

May 3, 2019 8:15 AM in response to goudkamp74

Scott Calabrese Barton

Feb 4, 2019 3:37 AM in response to goudkamp74

I can confirm that this worked. My issue was with localhost, because I had tried using an SSH tunnel to another web host that requested https.

Alexander Meier

Mar 18, 2019 12:30 AM in response to goudkamp74

Thanks for that solution - this is by far the most elegant way to get rid of that problem! :-)

ohvitorino

Apr 8, 2019 1:59 AM in response to goudkamp74

I can also confirm that this works. Thanks!

WebKit Features in Safari 18.0

Sep 16, 2024

by Jen Simmons

New in Safari 18

Web apps for mac, spatial web, managed media source, web inspector, safari extensions, deprecations, bug fixes and more, updating to safari 18.0.

Safari 18.0 is here. Along with iOS 18, iPadOS 18, macOS Sequoia and visionOS 2, today is the day another 53 web platform features, as well as 25 deprecations and 209 resolved issues land in WebKit, the rendering engine driving Safari.

Distraction Control

Distraction Control lets you hide distracting items as you browse the web, such as sign-in banners, cookie preference popups, newsletter signup overlays, and more, in Safari for iOS 18, iPadOS 18 and macOS Sequoia.

safari not opening localhost

We always recommend using semantic HTML when creating a website, including <video> , <main> , <article> and other elements that describe content. Doing so helps ensure both Safari Reader and Safari Viewer work best for the users of your website.

Safari windows on a Mac, with a video playing, big, in one window. The website is faintly visible behind the large video.

iPhone Mirroring and remote inspection

With iPhone Mirroring on macOS Sequoia, you can use your iPhone from your Mac. Combine it with remote inspection from Safari, and now it’s easier than ever to test and debug websites on iOS using Web Inspector .

Get set up for remote inspection by first ensuring you have Safari’s developer tools enabled on your Mac (if you can see the Develop menu in Safari, you’ve already done this step). Next, enable Web Inspector on your iPhone at Settings > Apps > Safari > Advanced > Web Inspector. Then, you’ll need to connect the device to your Mac using a cable to grant permission. Once plugged in, your device will appear in the Develop menu in Safari. Finally, to enable wireless debugging, go to Safari on macOS > Develop > [your device] > Connect via Network.

Now you can use Web Inspector to wirelessly debug websites running on iPhone anytime. And with iPhone Mirroring, you don’t even have to pull out your phone. Everything is on your Mac’s screen.

Learn more about remote inspection by reading Inspecting iOS and iPadOS , or by watching Rediscover Safari developer features from WWDC. Learn more about iPhone Mirroring 1 on apple.com .

Last year , we added support for web apps in macOS Sonoma. You can add any website to your dock — whether or not it was built with a Manifest file, Service Worker, or other technology to customize the web app experience. Go to the site in Safari, then File > Add to Dock… where you can customize the icon, change the name, and even adjust the URL. Then, just click on the web app icon in your Dock, and the website will open as a stand-alone app.

This year brings two improvements to web apps on Mac.

Opening links

macOS Sequoia adds support for opening links directly in web apps. Now, when a user clicks a link, if it matches the scope of a web app, that link will open in the web app instead of their default web browser. For example, imagine you have added MDN Web Docs to your Dock. Then a colleague sends you a link to an MDN page in Messages, Mail, Slack, Discord, IRC, or any non-browser application on your Mac. Now when you click on that link, it will open in the MDN Web Docs web app instead of your default browser.

Clicking a link within a browser will maintain the current behavior. This feature only affects links opened elsewhere. (When a user is in Safari, clicking on a link that matches the scope of a web app that is added to Dock, they will see an “Open in web app” banner, unless they have previously dismissed the banner.)

By default, this behavior applies when the link matches the host of the web page used to create the web app. As a developer, you can refine this experience by defining the range of URLs that should open in the web app with the scope member in the web app manifest .

Extension support

Now users can personalize web apps on Mac with Safari Web Extensions and Content Blockers. Navigate to the web app’s Settings menu to access all the installed Content Blockers and Web Extensions. Any enabled in Safari will be on by default in the web app. Each web app is uniquely customizable, just like Safari profiles.

View Transitions

WebKit added support for the View Transitions API in Safari 18. It provides an optimized browser API to animate elements from one state to another. Safari supports the CSS View Transitions Module Level 1 specification that adds new CSS properties and pseudo-elements for defining transition animations, along with a new browser API to start transition animations and react to different transition states. It works by capturing the current (old) state of the page and applying an animated transition to the new state. By default, the browser applies a cross-fade between the states.

Call the document.startViewTransition() method to initiate the capture. You can pass a callback function as the first argument to make DOM state changes between the old and new captures. The method returns a ViewTransition object which contains promises that can be used to track when the view transition starts or ends.

Once the states are captured, a pseudo-element tree is built which can be targeted with CSS, allowing you to modify the CSS animations used for the transitions. The animations out of the old page state and into the new page state can be modified via the ::view-transition-new(*) and ::view-transition-old(*) selectors. You can also ask the browser to independently track state changes for a specific element by naming it with the CSS view-transition-name property. You can then use the pseudo-elements to customize animations for it.

The :active-view-transition pseudo-class becomes active on the root element when a view transition is running.

The example below demonstrates state management with tabbed navigation. Each tab view has a custom transition animation out and a subtly different animation in, while the tabs themselves rely on the default page transition.

Style Queries

WebKit for Safari 18.0 adds support for Style Queries when testing CSS Custom Properties. Similar to how developers can use Sass mixins, Style Queries can be used to define a set of reusable styles that get applied as a group.

Here, if the --background custom property is set to black, then certain styles will be applied — in this case to make the headline and paragraph text color white.

Don’t forget to pay attention the HTML structure. By default, Style Queries reference the styles on the direct parent element. You can create a different reference through the use of Container Query names.

currentcolor and system color keywords in Relative Color Syntax

Support for Relative Color Syntax shipped in Safari 16.4 . It lets you define colors in a more dynamic fashion, creating a new color from an existing color. The value lch(from var(--color) calc(L / 2) C H) for instance uses the lch color space to take the variable --color and calculate a new color that’s half its lightness, calc(L / 2) .

Now in Safari 18.0, the first browser to ship support, you can reference the currentcolor or a system color keyword as you define the new color. For example, this code will set the background color to be the same color as the text color, only 4 times lighter, as calculated in the oklch color space.

Being able to reference system color keywords opens up another world of options. System colors are like variables that represent the default colors established by the OS, browser, or user — defaults that change depending on whether the system is set to light mode, dark mode, high contrast mode, etc. For example, canvas represents the current default background color of the HTML page, while fieldtext matches the color of text inside form fields. Find the full list of system colors in CSS Color level 4 .

Relative Color Syntax lets you define dynamic connections between colors in your CSS, lessening the need to control color through variables in a tightly-regimented design system. Learn more about Relative Color Syntax by watching this portion of What’s new in CSS from WWDC23.

Translucent accent colors

Partially transparent colors in accent-color are now blended on top of the Canvas system color to match the latest updates to the web standard. This means that any of the many ways to define colors using an alpha channel will now work as expected when used to define an accent color for a form control.

Animating display

WebKit for Safari 18.0 adds support for transition animation of the display property.

Many developers are excited to use @starting-style along with transition-behavior and display: none interpolation. WebKit for Safari 17.4 added general support for transition-behavior , including transition-behavior: allow-discrete . WebKit for Safari 17.5 added support for @starting-style , letting you define starting values for transitioning an element as it’s created (or re-created). Now in WebKit for Safari 18.0, you can use these features together to transition the display property.

Backdrop Filter

Originally shipped in Safari 9.0, backdrop filter provides a way to apply graphics effects to the content behind a particular element. You can apply backdrop-filter to a headline, for example, and everything behind the headline will be blurred, or have decreased saturation, or increased contrast. Any of the filter functions from SVG can be used — blur() , brightness() , contrast() , drop-shadow() , grayscale() , hue-rotate() , invert() , opacity() , saturate() , and sepia() .

For many years, backdrop filter only worked in Safari. It was available when you prefixed the property with -webkit-backdrop-filter . Now, starting in Safari 18.0, you don’t need the prefix. We also improved our implementation, fixing bugs and boosting interoperability.

This demo shows eight different filters and what you might do with each one alone. You can, of course, combine filters to create even more interesting results. With backdrop filter supported in Safari since 2015, Edge since 2018, Chrome since 2019, Samsung Internet since 2020, and Firefox since 2022, this is a great time to consider the kind of graphic design possibilities it enables.

Content visibility

WebKit for Safari 18.0 adds support for content-visibility . This property controls whether or not an element renders its contents in a fashion that’s useful for making performance optimizations. It lets you communicate to the browser that certain portions of the page will likely be initially offscreen, and suggest they be omitted from layout and rendering. This can make the page load faster.

WebKit for Safari 18.0 adds parsing support for the custom value for the prefers-contrast media query. (It does not return “true” on Apple platforms, since there is no forced-colors mode in iOS, iPadOS, macOS or visionOS.)

Safari 18.0 for visionOS 2 adds support for immersive-vr sessions with WebXR . Now you can create fully immersive experiences for people using Apple Vision Pro and deliver them through the web. WebXR scenes are displayed using hardware-accelerated graphics driven by WebGL .

A beautiful garden rendered in created graphics. There's a tree with bright red leaves. A blue sky full of puffy white clouds. Bright green grass, with a path leading by plants and garden sculpture. It's a world created in WebXR.

Safari for visionOS 2 supports the new WebXR transient-pointer input mode. It lets you make the most of natural input on visionOS, and allow your users to interact with a look and a pinch.

We are in a rendered 3d environment, in a garden. We look at a chess board, with a real human hand lifting a rendered chess piece to make the next move in the game. A floating panel has two buttons reading "Leave garden" and "Reset game".

If you want to animate a 3D model of the user’s hands, Safari for visionOS 2 also includes support for WebXR hand tracking . To ensure privacy, permission to allow hand tracking will be requested from users at the start of their WebXR session.

Learn all about WebXR on visionOS 2 by watching Build immersive web experiences with WebXR from WWDC. Learn more about transient-pointer input mode by reading Introducing natural input for WebXR in Apple Vision Pro . And learn all about how to use Safari’s developer tools on Mac to inspect and debug in Apple Vision Pro by reading Try out your website in the spatial web .

Spatial photos and panoramas

One of the amazing experiences you can have on Apple Vision Pro is looking at spatial photos and panoramas. The web is a great place to share these photos with others.

A family blows out candles on a birthday cake in a photo — that's floating in a frame in midair, in a living room. This is a still from the WWDC23 Keynote that introduced Apple Vision Pro. It's an example of how spatial photos work.

When you open the Photos app in visionOS, you see your library of photos. When you tap an image, it appears alone in a floating frame in front of you. Spatial photos appear at just the right height and viewing angle to make it feel like you’ve gone back to a moment in time. A second tap of the UI breaks a spatial photo out of its frame, becoming even more immersive. Similarly, a panorama floats in a frame on first tap. Then on second tap of the UI, it expands to wrap all around you, creating a fully immersive experience.

Now in Safari 18.0 for visionOS 2, you can use the JavaScript Fullscreen API to create a similar experience on the web. You can embed the photo in a web page, and provide the ability to tap. The photo will pop into a floating frame as the Safari window disappears. Then when the user taps on the spatial photo or panorama UI that visionOS provides, the photo will further expand to create a more immersive experience. When they exit the image, the Safari window will return.

Let’s walk through how to support experiencing a spatial photo or panorama on the web using Fullscreen API. First, include the image on your web page using any of the techniques used for years. Here, we can embed a flattened panoramic photo into the web page using simple HTML.

Then using JavaScript, we’ll trigger .requestFullscreen() on tap. Perhaps like this.

You could, of course, create your own UI for the user to tap, rather than making the entire photo the tap target.

Spatial images work just the same, although it’s likely we want to provide fallbacks for browsers that do not support HEIC files . We can do so with the picture element.

Spatial images are stereoscopic, with both a left and right channel. In Safari, when the image is embedded in the web page, the browser will show the left channel. And there’s no need to worry about providing a fallback of any sort for Safari on macOS, iOS, or iPadOS — the stereoscopic HEIC file works great.

This technique will also cause images to go fullscreen in any browser that supports Fullscreen API. Learn more about adding panorama and spatial photos to your websites by watching Optimize for the spatial web from WWDC.

Shaping interaction regions on visionOS

As a web developer, you’re very familiar with how link styling works on the web. For decades you’ve been able to use CSS to style text-decoration , color and more for :link , :hover , :active , and :visited states. You’ve also been able to adjust the size of the invisible tap target through use of padding.

Apple Vision Pro adds a new dimension to how links work — tap targets are visible on visionOS. Anytime a user looks at an interactive element, it’s highlighted to let them know that it can be tapped. And you as a designer or developer can intentionally design how an interaction region looks. You may want to add padding, for instance, or even a rounded corner to the otherwise invisible box.

Now in Safari in visionOS 2 , when you use CSS clip-path to change the shape of tappable area of a link, the visible interaction region will change shape as well. Interactive UI elements built with SVG and cursor: pointer will also be highlighted with the proper shape. Learn more by watching Optimize for the spatial web from WWDC.

Video on visionOS

Safari for visionOS 2 adds support for docking fullscreen videos into the current Environment . Anytime a user is watching a video fullscreen, they can tap the mountain symbol to enter an immersive experience. Turning the Digital Crown adjusts the immersion.

Writing Suggestions

At last year’s WWDC, Apple unveiled inline predictive text on iOS, iPadOS, macOS and more. It helps users input text faster by predicting what they might be typing and finishing the word, phrase or even a whole sentence when the user taps the space bar. Now, WebKit for Safari 18.0 on iOS, iPadOS, visionOS, macOS Sequoia and macOS Sonoma brings inline predictive text to the web.

While inline predictive text makes for a fantastic, personalized user experience, there might be specific situations on the web where it’s better to not have predictions. WebKit for Safari 18.0 on iOS, iPadOS, visionOS, macOS Sequoia and macOS Sonoma gives web developers the opportunity to disable inline predictions through the writingsuggestions attribute. By default, writing suggestions is set to true. You can turn off the capability by including the writingsuggestions="false" attribute on any type of text input field.

WebKit for Safari on iOS 18 adds haptic feedback for <input type=checkbox switch> . This means, now when a user taps a switch control on iPhone, a single tap is felt — just like how toggling a switch feels in Settings app on iOS. Try this demo to see what it’s like.

Date and time inputs

WebKit for Safari 18.0 on macOS improves accessibility support for date and time input field types. Now <input type="date"> , <input type="datetime-local"> , and <input type="time"> elements work properly with VoiceOver.

Usually elements have the labels they need, but sometimes there is no text label for a particular button or UI. In this situation, ARIA can be used to provide an accessible label. The aria-label attribute provides names of labels while aria-roledescription provides the description for the role of an element.

On very rare occasions, you may need to override aria-label or aria-roledescription to provide different names or descriptions specifically for braille. The aria-braillelabel and aria-brailleroledescription attributes provide such an ability. They exist to solve very specific needs, including educational contexts where the site needs to render the specific braille table dot pattern. If you do use braille-related ARIA attributes, be sure to test them using a braille reader. If in doubt, relying on the accessible name from content or aria-label / aria-roledescription is almost always the better user experience . WebKit has supported these ARIA attributes for years.

Now, WebKit for Safari 18.0 adds support for the ariaBrailleLabel and ariaBrailleRoleDescription element reflection properties. These make it possible to get and set the aria-braillelabel and aria-brailleroledescription ARIA attributes on DOM elements directly via JavaScript APIs, rather than by using setAttribute and getAttribute .

WebKit for Safari 18.0 adds support for Unicode 15.1.0 characters in RegExp. Unicode 15.1 added 627 characters, bringing the total of characters to 149,813. Now, these new characters can be used in regular expressions.

WebKit for Safari 18.0 also adds support for the v flag with RegExp.prototype[Symbol.matchAll] . providing more powerful ways to match Unicode characters, as specified in the ECMAScript 2024 standard.

For example, you can now specify to only match on Latin characters, while avoiding matching on Cyrillic script characters.

Or split a string matching on Emojis.

WebKit for Safari 18.0 adds support for URL.parse() , a way to parse URLs which returns null rather than an exception when parsing fails.

WebKit for Safari 18.0 expands Declarative Shadow tree support by adding the shadowRootDelegatesFocus and shadowRootClonable IDL attributes to the <template> element. It also adds the shadowRootSerializable attribute and shadowRootSerializable IDL attribute to the <template> element, enabling those using Declarative Shadow roots to opt into making them serializable. Serializing can be done through the new getHTML() method that has been added at the same time.

WebKit for Safari 18.0 adds support for PopStateEvent ’s hasUAVisualTransition , indicating whether the user agent has a visual transition in place for the fragment navigation.

WebKit for Safari 18.0 adds support for subresource integrity in imported module scripts, which gives cryptographic assurances about the integrity of contents of externally-hosted module scripts.

WebKit for Safari 18.0 adds support for the bytes() method to the Request, Response , Blob , and PushMessageData objects. This replaces the need for web developers to call arrayBuffer() , which can be difficult to use, and wraps the result in a Uint8Array . Calling bytes() is now the recommended way going forward when you need to access the underlying bytes of the data these objects represent.

WebKit for Safari 18.0 adds support for feature detecting text fragments by exposing document.fragmentDirective . Note that the returned object (a FragmentDirective ) doesn’t provide any functionality, but it’s helpful if you need to know if Fragment Directives are supported by the browser.

WebKit for Safari 18.0 adds support for the willReadFrequently context attribute for the getContext() method. It indicates whether or not a lot of read-back operations are planned. It forces the use of a software accelerated 2D or offscreen canvas, instead of hardware accelerated. This can improve performance when calling getImageData() frequently.

WebKit for Safari 18.0 extends 2D canvas support for currentcolor . It can now be used inside color-mix() or Relative Color Syntax. Here currentcolor will default to the computed color property value on the canvas element.

WebKit for Safari 18.0 adds Workers support for both Managed Media Source (MMS) and Media Source Extensions ( MSE ). This can be especially helpful on complex websites that want to ensure continuous and smooth video playback even when other site activity (such as live commenting) causes a very busy main thread. You can see the performance difference in this demo .

WebKit for Safari 18.0 adds support for the WebRTC HEVC RFC 7789 RTP Payload Format. Previously, the WebRTC HEVC used generic packetization instead of RFC 7789 packetization. This payload format provides a new option for improving videoconferencing, video streaming, and delivering high-bitrate movies and TV shows.

WebKit for Safari 18.0 adds support for MediaStreamTrack processing in a dedicated worker. And it adds support for missing WebRTC stats.

WebKit for Safari 18.0 adds support for secure HTTPS for all images, video, and audio by upgrading passive subresource requests in mixed content settings. This means that if some files for a website are served using HTTPS and some are served using HTTP (known as “mixed content”), all images and media will now be auto-upgraded to HTTPS, in adherence with Mixed Content Level 2 .

WebKit for Safari 18.0 adds support for six new WebGL extensions:

  • EXT_texture_mirror_clamp_to_edge
  • WEBGL_render_shared_exponent
  • WEBGL_stencil_texturing
  • EXT_render_snorm
  • OES_sample_variables
  • OES_shader_multisample_interpolation

WebKit for Safari 18.0 adds support for fuzzy search code completion in the Web Inspector’s CSS source editor.

Two years ago at WWDC22, we announced support for passkeys — a groundbreaking industry-standard way to login to websites and app services. Passkeys provide people with an extremely easy user experience, while delivering a profound increase in security. To learn more, watch Meet Passkeys or read Supporting passkeys .

WebKit for Safari 18.0 adds support for three new features as we continue to improve passkeys. First, Safari 18.0 adds support for using mediation=conditional for web authentication credential creation. This allows websites to automatically upgrade existing password-based accounts to use passkeys. Learn more by watching Streamline sign-in with passkey upgrades and credential managers from WWDC.

Second, WebKit for Safari 18.0 adds support for using passkeys across related origins. This lets websites use the same passkey across a limited number of domains which share a credential backend.

And third, WebKit for Safari 18.0 adds support for the WebAuthn prf extension. It allows for retrieving a symmetric key from a passkey to use for the encryption of user data.

Safari 18.0 also adds support for Mobile Device Management of extension enabled state, private browsing state, and website access on managed devices. This means schools and businesses that manage iOS, iPadOS, or macOS devices can now include the configuration of Safari App Extensions, Content Blockers, and Web Extensions in their management.

WebKit for Safari 18.0 adds support for funds transfer via Apple Pay.

While it’s rare to deprecate older technology from the web, there are occasions when it makes sense. We’ve been busy removing -webkit prefixed properties that were never standardized, aging media formats that were never supported in other browsers, and more. This helps align browser engines, improve interoperability, and prevent compatibility problems by reducing the possibility that a website depends on something that’s not a web standard.

WebKit for Safari 18.0 removes support for OffscreenCanvasRenderingContext2D ’s commit() method.

WebKit for Safari 18.0 deprecates support for a number of rarely used -webkit prefixed CSS pseudo-classes and properties — and even one -khtml prefixed property.

  • -webkit-alt and alt properties
  • :-webkit-animating-full-screen-transition pseudo-class
  • :-webkit-full-screen-ancestor pseudo-class
  • :-webkit-full-screen-controls-hidden pseudo-class
  • :-webkit-full-page-media pseudo-class
  • :-webkit-full-screen-document pseudo-class
  • :-khtml-drag pseudo-class

WebKit for Safari 18.0 also deprecates support for the resize: auto rule. Support for the resize property remains, just as it’s been since Safari 4. The values Safari continues to support include : none , both , horizontal , vertical , block , inline , plus the global values. Early versions of CSS Basic User Interface Module Level 3 defined auto , but it was later written out of the web standard.

WebKit for Safari 18.0 also deprecates support for non-standardize WEBKIT_KEYFRAMES_RULE and WEBKIT_KEYFRAME_RULE API in CSSRule .

WebKit for Safari 18.0 removes support for the JPEG2000 image format. Safari was the only browser to ever provide support.

If you’ve been serving JPEG2000 files using best practices, then your site is using the picture element to offer multiple file format options to every browser. Safari 18.0 will simply no longer choose JPEG2000, and instead use a file compressed in JPEG XL, AVIF, WebP, HEIC, JPG/JPEG, PNG, or Gif — choosing the file that’s best for each user. Only one image will be downloaded when you use <picture> , and the browser does all the heavy lifting.

We have noticed that some Content Deliver Networks (CDN) use User Agent sniffing to provide one file to each UA, offering only JPEG2000 images to Safari — especially on iPhone and iPad. If you expect this might be happening with your site, we recommend testing in Safari 18.0 on both macOS Sequoia and iOS or iPadOS 18. If you see problems, contact your SaaS provider or change your image delivery settings to ensure your website provides fallback images using industry best practices.

If you notice a broken site, please file an issue at webcompat.com .

WebKit for Safari 18.0 removes [[VarNames]] from the global object to reflect changes in the web standard, a change that now allows this code to work:

WebKit for Safari 18.0 removes support for non-standard VTTRegion.prototype.track .

WebKit for Safari 18.0 removes the last bits of support for AppCache.

When AppCache first appeared in 2009, in Safari 4, it held a lot of promise as a tool for caching web pages for use offline. It was imagined as “HTML5 Application Cache” back when HTML itself was being further expanded to handle more use cases for web applications. A developer could create a simple cache manifest file with a list of files to be cached. Its simplicity looked elegant, but there was no mechanism for cache busting, and that made both developing a site and evolving the site over time quite frustrating. AppCache also had security challenges. So new web standards were created to replace it. Today, developers use Service Workers and Cache Storage instead.

WebKit deprecated AppCache with a warning to the Console in Safari 11.0. Then in 2021, we removed support for AppCache from Safari 15.0, with a few exceptions for third-party users of WKWebView . Now we are removing those exceptions. This change to WebKit will only affect the rare web content loaded in older third-party apps that have JavaScript code which relies on the existence of AppCache related interfaces.

WebKit for Safari 18.0 removes the SVGAnimateColorElement interface, as well as the non-standard getTransformToElement from SVGGraphicsElement .

WebKit for Safari 18.0 removes support for four non-standard Web APIs:

  • KeyboardEvent.altGraphKey
  • AES-CFB support from WebCrypto
  • KeyboardEvent.prototype.keyLocation
  • HashChangeEvent ’s non-standard initHashChangeEvent() method

Deprecated some legacy WebKit notification names including:

  • WebViewDidBeginEditingNotification
  • WebViewDidChangeNotification
  • WebViewDidEndEditingNotification
  • WebViewDidChangeTypingStyleNotification
  • WebViewDidChangeSelectionNotification

In addition to all the new features, WebKit for Safari 18.0 includes work to polish existing features.

Accessibility

  • Fixed role assignment for <header> inside <main> and sectioning elements.
  • Fixed range input not firing an input event when incremented or decremented via accessibility APIs.
  • Fixed setting aria-hidden on a slot not hiding the slot’s assigned nodes.
  • Fixed VoiceOver to read hidden associated labels.
  • Fixed comboboxes to expose their linked objects correctly.
  • Fixed VoiceOver support for aria-activedescendant on macOS.
  • Fixed time input accessibility by adding labels to subfields.
  • Fixed aria-hidden=true to be ignored on the <body> and <html> elements.
  • Fixed datetime values being exposed to assistive technologies in the wrong timezone.
  • Fixed wrong datetime value being exposed to assistive technologies for datetime-local inputs.
  • Fixed ignored CSS content property replacement text when it is an empty string.
  • Fixed the computed role for these elements: dd , details , dt , em , hgroup , option , s , and strong .
  • Fixed hidden elements targeted by aria-labelledby to expose their entire subtree text, not just their direct child text.
  • Fixed accessible name computation for elements with visibility: visible inside a container with visibility: hidden .
  • Fixed updating table accessibility text when its caption dynamically changes.
  • Fixed updating aria-describedby text after the targeted element changes its subtree.
  • Fixed the transition property to produce the shortest serialization.
  • Fixed the animation property to produce the shortest serialization.
  • Fixed arbitrary 8 digit limit on a line item’s total amount.

Authentication

  • Fixed navigator.credentials.create() rejects with “NotAllowedError: Operation Failed” after a conditional UI request is aborted.
  • Fixed setting the cancel flag once the cancel completes regardless of a subsequent request occurring.
  • Fixed drawImage(detachedOffscreenCanvas) to throw an exception.
  • Fixed OffscreenCanvas failing to render to the placeholder with nested workers.
  • Fixed losing the contents layer of the placeholder canvas of OffscreenCanvas when switching off the tab.
  • Fixed drawImage to not alter the input source or the destination rectangles.
  • Fixed toggling the visibility on a canvas parent undoing the effect of clearRect() .
  • Fixed the Canvas drawImage() API to throw an exception when the image is in broken state.
  • Fixed a detached OffscreenCanvas to not transfer an ImageBuffer.
  • Fixed treating the lack of an explicit “SameSite” attribute as “SameSite=Lax”.
  • Fixed setting white-space to a non-default value dynamically on a whitespace or a new line.
  • Fixed custom counter styles disclosure-open and disclosure-closed to point to the correct direction in right-to-left.
  • Fixed backface-visibility to create a stacking context and containing block.
  • Fixed getComputedStyle() to work with functional pseudo-elements like ::highlight() .
  • Fixed: Aliased :-webkit-full-screen pseudo-class to :fullscreen .
  • Fixed: Aliased :-webkit-any-link to :any-link and :matches() to :is() .
  • Fixed getComputedStyle() pseudo-element parsing to support the full range of CSS syntax.
  • Fixed @supports to correctly handle support for some -webkit prefixed pseudo-elements that were incorrectly treated as unsupported.
  • Fixed updating media-query sensitive meta tags after style changes.
  • Fixed changing color scheme to update gradients with system colors or light-dark() .
  • Fixed incorrect inline element size when using font-variant-caps: all-small-caps with font-synthesis .
  • Fixed :empty selector to work with animations.
  • Fixed preserving whitespace when serializing custom properties.
  • Fixed updating style correctly for non-inherited custom property mutations.
  • Fixed element removed by parent to end up losing the last remembered size.
  • Fixed an incorrect difference between implicit and explicit initial values for custom properties.
  • Fixed the contrast of Menu and MenuText system colors.
  • Fixed keeping the shorthand value for CSS gap as-is in serialized and computed values.
  • Fixed the style adjuster for @starting-style incorrectly invoking with a null element.
  • Fixed excluding -apple-pay-button from applying to any element that supports appearance: auto and is not a button.
  • Fixed missing color interpretation methods added to CSS color specifications.
  • Fixed hsl() and hsla() implementation to match the latest spec changes.
  • Fixed the implementation of rgb() and rgba() to match the latest spec.
  • Fixed the hwb() implementation to match the latest spec.
  • Fixed the remaining color types to be synced with the latest spec changes.
  • Fixed carrying analogous components forward when interpolating colors.
  • Fixed applying the fill layer pattern for mask-mode .
  • Fixed backdrop-filter: blur to render for elements not present when the page is loaded.
  • Fixed: Improved large Grid performance.
  • Fixed some CSS properties causing quotes to be reset.
  • Fixed an issue where input method editing would sporadically drop the composition range.
  • Fixed dictation UI no longer showing up when beginning dictation after focusing an empty text field. (FB14277296)
  • Fixed displayed datalist dropdown to sync its options elements after a DOM update.
  • Fixed input elements to use the [value] as the first fallback step base.
  • Fixed <select multiple> scrollbars to match the used color scheme.
  • Fixed updating the input value when selecting an <option> from a <datalist> element. (FB13688998)
  • Fixed the value attribute not getting displayed in an input element with type="email" and the multiple attribute.
  • Fixed the iOS animation for <input type=checkbox switch> .
  • Fixed form controls drawing with an active appearance when the window is inactive.
  • Fixed constructed FormData object to not include entries for the image button submitter by default.
  • Fixed the properties of History to throw a SecurityError when not in a fully active Document.
  • Fixed “about:blank” document.referrer initialization.
  • Fixed parsing a self-closing SVG script element. It now successfully executes.
  • Fixed RegExp.prototype.@@split to update the following legacy RegExp static properties: RegExp.input , RegExp.lastMatch , RegExp.lastParen , RegExp.leftContext , RegExp.rightContext , and RegExp.$1, ... RegExp.$9 .
  • Fixed String.prototype.replace to not take the fast path if the pattern is RegExp Object and the lastIndex is not numeric.
  • Fixed spec compliance for Async / Await, Generators, Async Functions, and Async Generators.
  • Fixed async functions and generators to properly handle promises with throwing “constructor” getter.
  • Fixed return in async generators to correctly await its value.
  • Fixed Symbol.species getters to not share a single JS Function.
  • Fixed throwing a RangeError if Set methods are called on an object with negative size property.
  • Fixed eval() function from another realm to not cause a direct eval call.
  • Fixed eval() call with ...spread syntaxt to be a direct call.
  • Fixed try/catch to not intercept errors originated in [[Construct]] of derived class.
  • direct eval() in a default value expression inside a rest parameter creates a variable in the environment of the function rather than the separate one of the parameters;
  • a ReferenceError is thrown when accessing a binding, which is defined inside rest parameter, in eval() , or a closure created in a default value expression of a preceding parameter, but only if there is a var binding by the same name;
  • a closure, created in the default value expression inside a rest parameter, is created in a different VariableEnvironment of the function than its counterparts in preceding parameters which causes the incorrect environment to be consulted when querying or modifying parameter names that are “shadowed” by var bindings.
  • Fixed TypedArray sorting methods to have a special-case for camparator returning false .
  • Fixed programming style for bitwise and in setExpectionPorts.
  • Fixed emitReturn() to load this value from arrow function lexical environment prior to the TDZ check.
  • Fixed NFKC normalization to work with Latin-1 characters.
  • Fixed parsing of private names with Unicode start characters.
  • Fixed instanceof to not get RHS prototype when LHS is primitive.
  • Fixed bracket update expression to resolve property key at most once.
  • Fixed bracket compound assignement to resolve the property key at most once.
  • Fixed Object.groupBy and Map.groupBy to work for non-objects.
  • Fixed Array.fromAsync to not call the Array constructor twice.
  • Fixed inconsistent output of Function.prototype.toString for accessor properties.
  • Fixed Set#symmetricDifference to call this.has in each iteration.
  • Fixed logical assignment expressions to throw a syntax error when the left side of the assignment is a function call.
  • Fixed throwing a syntax error for nested duplicate-named capturing groups in RegEx.
  • Fixed ArrayBuffer and SharedArrayBuffer constructor to check length before creating an instance.
  • Fixed Intl implementation to ensure canonicalizing “GMT” to “UTC” based on a spec update.
  • Fixed RegEx lookbehinds differing from v8.
  • Fixed fractionalDigits of Intl.DurationFormat to be treated as at most 9 digits if it is omitted.
  • Fixed optimized TypedArrays giving incorrect results.
  • Fixed Intl.DurationFormat for numeric and 2-digit .
  • Fixed navigator.cookieEnabled to return false when cookies are blocked.
  • Fixed MediaSession to determine the best size artwork to use when the sizes metadata attribute is provided. (FB9409169)
  • Fixed video sound coming from another window after changing tabs in the Tab Bar in visionOS.
  • Fixed playback for MSE videos on some sites.
  • Fixed allowing a video’s currentTime to be further than the gap’s start time.
  • Fixed broken audio playback for a WebM file with a Vorbis track.
  • Fixed sampleRate and numberOfChannels to be required and non-zero in a valid AudioEncoderConfig.
  • Fixed media elements appending the same media segment twice.
  • Fixed an issue where Safari audio may be emitted from the wrong window in visionOS.
  • Fixedrejecting valid NPT strings if ‘hours’ is defined using 1 digit.
  • Fixed picture-in-picture when hiding the <video> element while in Viewer.
  • Fixed the return button not working after the video is paused and played in picture-in-picture.
  • Fixed upgrading inactive or passive subresource requests and fetches in would-be mixed security contexts to match standards.
  • Fixed incorrect Sec-Fetch-Site value for navigation of a nested document.
  • Fixed loading WebArchives with a non-persistent datastore.
  • Fixed Timing-Allow-Origin to not apply to an HTTP 302 response.
  • Fixed print buttons with a print action implementation.
  • Fixed Open in Preview for a PDF with a space in its name.
  • Fixed “Open with Preview” context menu item to work with locked PDF documents.
  • Fixed Greek uppercase transforms failing for some characters.
  • Fixed resizing a <textarea> element with 1rem padding.
  • Fixed the color correctness of the color matrix filter.
  • Fixed backdrop-filter to apply to the border area of an element with a border-radius .
  • Fixed intrinsic inline size calculators to account for whitespace before an empty child with nonzero margins.
  • Fixed overlapping elements with flex box when height: 100% is applied on nested content.
  • Fixed incorrect grid item positioning with out-of-flow sibling.
  • Fixed break-word with a float discarding text.
  • Fixed min-content calculation for unstyled only-child inlines elements.
  • Fixed ellipsis rendering multiple times when position: relative and top are used.
  • Fixed a bug for inline elements inserted in reverse order after a block in a continuation.
  • Fixed the flash of a page background-colored bar in the footer when the window is resized.
  • Fixed garbled bold text caused by glyph lookup using the wrong font’s glyph IDs when multiple installed fonts have the same name. (FB13909556)
  • Fixed selecting Japanese text annotated with ruby in a vertical-rl writing mode table.
  • Fixed support for border, padding, and margin on mfrac and mspace elements in MathML.
  • Fixed the cursor not updating as content scrolls under it on some pages.
  • Fixed stripping the scroll-to-text fragment from the URL to prevent exposing the fragment to the page.
  • Fixed CORS bypass on private localhost domain using 0.0.0.0 host and mode “no-cors”.
  • Fixed blocking cross-origin redirect downloads in an iframe.
  • Fixed blocked cross-origin redirect downloads to attempt rendering the page instead.
  • Fixed the SVG parser to interpret “form feed” as white space.
  • Fixed error handling for invalid filter primitive references.
  • Fixed displaying an SVG element inside a <switch> element.
  • Fixed SVG title to have display: none as the default UA style rule.
  • Fixed the UA stylesheet for links in SVGs to apply cursor: pointer matching standards.
  • Fixed returning the initial value for the SVG gradient stop-color if it is not rendered in the page.
  • Fixed the SVG marker segment calculations if the marker path consists of sub-paths.
  • Fixed SVGLength to sync with the WebIDL specification.
  • Fixed disclosure counter styles to consider writing-mode .

Web Animations

  • Fixed percentage transform animations when width and height are animated.
  • Fixed updating an animation when changing the value of a transform property while that property is animated with an implicit keyframe.
  • Fixed display transition to none .
  • Fixed cssText setter to change the style attribute when the serialization differs. (FB5535475)
  • Fixed history.pushState() and history.replaceState() to ignore the title argument.
  • Fixed URL text fragment directives not fully stripped from JavaScript.
  • Fixed showPicker() method to trigger suggestions from a datalist .
  • Fixed lang attribute in no namespace to only apply to HTML and SVG elements.
  • Fixed unnecessarily unsetting the iframe fullscreen flag.
  • Fixed DOM Range to correctly account for CDATASection nodes.
  • Fixed getGamepads() to no longer trigger an insecure contexts warning.
  • Fixed inserting a <picture> element displaying the same image twice.
  • Fixed throwing exceptions in navigation methods if in a detached state.
  • Fixed a minor issue in URL’s host setter.
  • Fixed cloning of ShadowRoot nodes following a DOM Standard clarification.
  • Fixed GeolocationCoordinates to expose a toJSON() method.
  • Fixed IntersectionObserver notifications that sometimes fail to fire.
  • Fixed GeolocationPosition to expose a toJSON() method.
  • Fixed setting CustomEvent.target when dispatching an event.
  • Fixed navigator.language only returning the system language in iOS 17.4.
  • Fixed: Removed presentational hints from the width attribute for <hr> .
  • Fixed an issue when inserting writing suggestions into an editable display: grid container.
  • Fixed the warning message for window.styleMedia .
  • Fixed resolving www. sub-domain for Associated Domains for all web apps.

Web Assembly

  • Fixed initialization of portable reference typed globals.

Web Extensions

  • Fixed getting an empty key from storage. (FB11427769)
  • Fixed Service Workers not appearing in the Develop menu or remote Web Inspector menu. (130712941)
  • Fixed web extensions unable to start due to an issue parsing declarativeNetRequest rules. (FB14145801)
  • Fixed font sizes in the Audits tab.
  • Fixed expanded sections of Storage to not collapse.
  • Fixed Web Inspector to show nested workers.
  • Fixed CSS font property values marked !important not getting overridden when using the interactive editing controls.
  • Fixed an issue where the Web Inspector viewport might appear cut off.
  • Fixed runtimes to be aligned in the Audit tab.
  • Fixed remembering the message type selection in the Console tab.
  • Fixed autocomplete for the text-indent property suggesting prefixed properties instead of each-line or hanging .
  • Fixed background autocompletion suggestion to include repeating-conic-gradient .
  • Fixed the list of breakpoints in the Sources tab disappearing when Web Inspector is reloaded.
  • Fixed console clearing unexpectedly when Web Inspector reopens.
  • Fixed console code completion to be case-insensitive.
  • Fixed overflow: scroll elements to scroll as expected when highlighting an element from the DOM tree.
  • Fixed showing additional Safari tabs from an iOS device in the Develop menu.
  • Fixed Console and code editor completion not auto-scrolling the suggestion into view.
  • Fixed search in the DOM tree view unexpectedly chaning the text display.
  • Fixed clicking the “goto” arrow for computed CSS when “show independent Styles sidebar” is disabled.
  • Fixed inspectable tabs from Safari in the visionOS Simulator don’t appear in Developer menu on the host macOS.
  • Fixed Accessibility inspector for switch controls to report “State: on/off” instead of “Checked: true/false”.
  • Fixed Gamepad API in WKWebView.
  • Fixed repainting HTML elements when their width or height change in legacy WebView.
  • Fixed retrieving titles containing multibyte characters.
  • Fixed RTCEncodedVideoFrame and RTCEncodedAudioFrame to match the WebIDL specification.
  • Fixed VideoTrackGenerator writer to close when its generator track (and all its clones) are stopped.
  • Fixed WebRTC AV1 HW decoding on iPhone 15 Pro.
  • Fixed black stripes with screen sharing windows.
  • Fixed black stripes with getDisplayMedia captured windows when the window is resized.

Safari 18.0 is available on iOS 18 , iPadOS 18 , macOS Sequoia , macOS Sonoma, macOS Ventura, and in visionOS 2 .

If you are running macOS Sonoma or macOS Ventura, you can update Safari by itself, without updating macOS. Go to  > System Settings > General > Software Update and click “More info…” under Updates Available.

To get the latest version of Safari on iPhone, iPad or Apple Vision Pro, go to Settings > General > Software Update, and tap to update.

We love hearing from you. To share your thoughts on Safari 18.0, find us on Mastodon at @[email protected] and @[email protected] . Or send a reply on X to @webkit . You can also follow WebKit on LinkedIn . If you run into any issues, we welcome your feedback on Safari UI (learn more about filing Feedback ), or your WebKit bug report about web technologies or Web Inspector. If you notice a website that seems broken in Safari, but not in other browsers, please file a report at webcompat.com . Filing issues really does make a difference.

Download the latest Safari Technology Preview on macOS to stay at the forefront of the web platform and to use the latest Web Inspector features.

You can also find this information in the Safari 18.0 release notes .

1. iPhone Mirroring is available on Mac computers with Apple silicon and Intel-based Mac computers with a T2 Security Chip. Requires that your iPhone and Mac are signed in with the same Apple ID using two-factor authentication, your iPhone and Mac are near each other and have Bluetooth and Wi-Fi turned on, and your Mac is not using AirPlay or Sidecar. iPhone Mirroring is not available in all regions.

IMAGES

  1. Apple: Safari can't connect to localhost

    safari not opening localhost

  2. Safari can’t open the page на localhost

    safari not opening localhost

  3. macbook pro

    safari not opening localhost

  4. How to Fix Safari Not Opening Sites on iPhones [Solved]

    safari not opening localhost

  5. How to Fix Safari Not Opening Sites on iPhones [Solved]

    safari not opening localhost

  6. How to Fix Safari Not Opening Sites on iPhones [Solved]

    safari not opening localhost

VIDEO

  1. How To Fix Safari Not Playing Videos On iPhone/iPad

  2. How to Fix Safari Not Working on iPhone \ iOS 18

  3. Safari not opening links in tabs

  4. How to Fix Safari Not Working on iPhone After iOS 18 Update

  5. how to fix safari not working on mac //Safari not displaying websites Mac

  6. Safari not downloading files on iPhone : Fix

COMMENTS

  1. Safari can't connect to the server "localhost"

    Safari Can't Connect to the Server. Safari can't open the page "localhost:8080" because Safari can't connect to the server "localhost". What we have tried: Changing default web browsers to Firefox and Chrome: Similar errors. Check Apache is up to date and running: Yes. Server version: Apache/2.4.18 (Unix)

  2. mac

    12. I've encountered a really strange Mac problem: Safari is unable to connect to localhost whereas all other applications can connect as normal (Firefox, Chrome, ping, etc.). My /etc/hosts is the standard setup: $ egrep localhost /etc/hosts. # localhost is used to configure the loopback interface. 127.0.0.1 localhost.

  3. Safari can't connect to the server "localhost"

    sudo httpd -k stop. sudo httpd -k restart. Look also into the Console.app log and filter to see what information you can get from there. If it is enabled you should get the following on pointing to localhost within a browser. It works! So far so good, the server is running.

  4. Why can't Safari connect to localhost?

    1 Answer. Sorted by: Reset to default. 6. It turned out that I forgot I had made a symlink for /etc/hosts to a file I store elsewhere so I always have access to it if my system crashes, etc. Apparently, Safari doesn't follow the symlink for /etc/hosts. I made a hard link so I have a copy elsewhere, and now Safari recognizes localhost servers.

  5. Safari cannot connect to localhost but can connect to 127.0.0.1

    4. Note: This might not solve everyone's problem. I am a MAMP user and noticed in my hosts settings that 127.0.0.1 localhost was removed somehow. Type sudo nano /etc/hosts, type in your password, and then add these default lines back: 127.0.0.1 localhost. ::1 localhost. This worked for me.

  6. Safari can't connect to the server "local…

    Is this site something shared from another computer or a server on your network? If so, make sure you're following the steps in this link to connect to the site: Connect your Mac to shared computers and servers. We hope this helps. Take care. Safari can't connect to the server "localhost". . Support.

  7. network

    El Capitan Safari Can't open localhost but 127.0.0.1 works. 3. MacOS Sierra - localhost not found while using Hugo (not related to Apache) 3. iOS 17 (possibly) has broken OpenDNS filtering. 0. inconsistent resolution of "localhost" macOS Sonoma 14.4.1. Hot Network Questions

  8. Localhost has stopped working on Chrome and Safari since upgrading to

    When I type 'localhost' in either browser - I get "it works!" 'https://localhost:8888' returns On Chrome: "This site can't provide a secure connection localhost sent an invalid response. ERR_SSL_PROTOCOL_ERROR" On Safari: "Safari can't open the page "https://localhost:8888" because Safari can't establish a secure connection to the server ...

  9. Safari cannot connect to the server 'loca…

    Safari 16.4 dropped connections (Ventura) I'm running out of options with my 'safari can't open page because server unexpectedly dropped the connection' problem. It is only on one MacBook and I'm wondering if it's possibly a Safari issue. Is there any way to reinstall Safari or is it tightly integrated into the system files. Thanks, David

  10. I face issues while testing localhost URLs or private servers in Safari

    Safari, both on Desktop (OS X, macOS) and on real iOS devices has known issues with resolving URLs which have the string "localhost". We recommend you try the following: Try replacing 'localhost' in the URL you are using with the IP address of the machine.

  11. How to Fix "Safari Can't Establish a Secure Connection" Error

    To get started, browse to Apple > System Preferences > Network. Find the network option in the preferences. From this window, select your connection, then click on the Advanced tab, followed by DNS. Next, click on the (+) icon next to IPv4 or IPv6 addresses. Click on the DNS tab.

  12. macos

    neither localhost/~username (username = my name), nor localhost/username work - Safari displays a message that it can't connect to the localhost. and of course I can't reach my Sites folder, because two previous steps don't work. httpd -v. Server version: Apache/2.4.18 (Unix) Server built: Feb 20 2016 20:03:19. Apache configtest is successful:

  13. Issues Connecting to Localhost with Safari

    Sep 21, 2021. When asked to make some types of connection to localhost or 127.0.0.1, Safari may ignore any configured proxy. This may cause Safari to not fetch traffic via Sauce Connect, causing tests to fail. To prevent this, use a different hostname for the system under test. You can either use the existing hostname of the system, or set a ...

  14. Safari forcing HTTPS for some HTTP only s…

    It was driving me crazy, as I'd managed to get this set for localhost. However, just selecting localhost and deleting all its cookies worked fine in the regular Safari (12.1)/ Show more Less. ... Safari not able to open HTTP pages Hello, Safari Version 15.4 (15613.1.17.1.13, 15613) seems not able to open HTTP, it keeps loading forever. Only ...

  15. Localhost refused to connect: Here's how to fix it

    Open a terminal. Run the following command to check the Apache service status: If you're not using the system, you might need to use service or /etc/init.d/ scripts depending on your system. Look for lines indicating that the Apache service is active and running. 5. Check your browser settings. Unable to connect to localhost?

  16. macos

    The localhost page isn't working. localhost didn't send any data. ERR_EMPTY_RESPONSE. Firefox redirects the request to www.localhost.com:8080 which of course isn't correct. My research suggests that it is doing this because it can't find localhost. Safari says it can't open the page because "the server unexpectedly dropped the connection."

  17. WebKit Features in Safari 18.0

    (It does not return "true" on Apple platforms, since there is no forced-colors mode in iOS, iPadOS, macOS or visionOS.) Spatial Web WebXR. Safari 18.0 for visionOS 2 adds support for immersive-vr sessions with WebXR. Now you can create fully immersive experiences for people using Apple Vision Pro and deliver them through the web.

  18. How to open a http page in safari?

    Safari can't open the page "https://..." because Safari can't establish a secure connection to the server "...". Is there a way to open such a page nevertheless in Safari? This is for testing purposes only, (to test the rendering of this non-public page, visible only through VPN), so there is no security concern?

  19. Safari can't open the page "localhost/~me"

    It was working fine yesterday, but this morning I cannot get to my personal subdirectories. I can get to localhost and localhost/~kvaughn fine, but localhost/~kvaughn/ returns the following format regardless of which subdirectory I choose. I did make some edits to kvaughn.conf yesterday, but it was still working fine after running apachectl ...

  20. Safari can't open the page localhost:random_port

    I followed the instructions on Google API quickstart Python so that I can get started quickly. I downloaded the JSON file set with the default name and as a Desktop App. After making sure the each Python library was up to date, I pasted and ran the code on the page.