Why a Site Works in Chrome but Breaks in Safari
The bug report says "the booking form is broken", and on your machine it works perfectly. Then someone mentions they are on an iPhone. Ten minutes later you find the date field shows "Invalid Date" in Safari and nowhere else.

The bug report says "the booking form is broken", and on your machine it works perfectly. Then someone mentions they are on an iPhone. Ten minutes later you find the date field shows "Invalid Date" in Safari and nowhere else. A site that works in Chrome but not Safari is one of the most common cross browser problems I see, and it almost always comes from the same short list of causes.
The reason it matters more than it used to: on iPhones, Safari's engine, WebKit, sits underneath almost every browser people use, including the iOS versions of Chrome and Firefox. A WebKit bug is not a niche Safari problem. For many sites it is a third or more of mobile visitors. Here is how I track these issues down, in the order they usually turn up.
Why a Site Works in Chrome but Not Safari
Chrome and Edge use the Blink engine. Safari uses WebKit. They share a common ancestor and follow the same web standards, but each ships features on its own schedule and interprets edge cases its own way. Three kinds of difference cause most breakages:
- Features that arrived later in WebKit, so older Safari versions still in use do not support them.
- Stricter parsing, where Blink quietly accepts something non standard and WebKit refuses.
- Different privacy and media rules, especially around cookies, storage and autoplay.
Keep in mind that Safari updates mostly arrive with operating system updates. A visitor on an older iPhone may be several WebKit versions behind, while desktop Chrome updates itself every few weeks.
The Usual Suspects in JavaScript
Date strings
This is the bug from the opening. Passing a string like "2026-03-14 09:30", with a space between date and time, to the Date constructor works in Chrome. Older Safari versions return an invalid date. The fix is to use the full ISO format with a "T" separator, or parse the parts yourself. Never rely on the browser to guess a date format.
Newer APIs used without checks
Features such as requestIdleCallback have long been missing from Safari, and others arrived years after Chrome. If you call an API directly, one missing function can stop the rest of the script. Wrap optional features in a simple existence check and provide a fallback.
Regular expressions
Lookbehind assertions in regular expressions only reached Safari in version 16.4. On older devices, a single lookbehind in a bundled file can throw a syntax error and kill the whole bundle, not just that function.
Layout Bugs That Only Show on iPhone
CSS problems are harder to spot because nothing errors; the page just looks wrong.
| Symptom | Common cause | Typical fix |
|---|---|---|
| Full height section cut off at the bottom | 100vh ignores the moving browser toolbar | Use the dvh or svh units with a vh fallback |
| Page zooms in when tapping an input | Input font size below 16px | Set form inputs to at least 16px |
| Sticky header jumps or vanishes | Overflow set on a parent element | Remove overflow from ancestors of the sticky element |
| Buttons look different from the design | Default WebKit appearance styling | Reset appearance on buttons and inputs |
The input zoom one surprises people most. It is intentional behaviour to keep text readable, and the only clean fix is a larger font size.
Cookies, Storage and the Login That Keeps Expiring
If users on Safari report being logged out after a week, look at how your cookies are set. Safari's Intelligent Tracking Prevention caps cookies created by JavaScript, through document.cookie, to seven days in many situations. Cookies set by the server in a response header are treated more generously.
Script writable storage such as localStorage can also be cleared after a period without user interaction on the site. For anything that must persist, like a login session, set cookies from the server with sensible attributes. How the browser chooses which cookies to attach to each request is a related topic we covered in depth in our piece on cookie sending rules, and caching can make the problem look intermittent, as explained in how browser caching decides what reloads.
Embedded content is stricter still. Third party cookies inside iframes are blocked by default in Safari, so embedded login widgets often fail there first.
Why "Just Add a Polyfill" Is the Wrong First Move
A common reflex is to load a large polyfill bundle so every browser gets every feature. I advise against making that the first step.
Polyfills hide the actual cause. You end up shipping tens of kilobytes to every visitor, including those on modern browsers who never needed them, and you still do not know which line broke. Worse, some problems, like the date parsing case or ITP cookie limits, are not missing features at all, so no polyfill fixes them.
Find the exact failing line first. Then decide: rewrite it in a form all browsers handle, add a targeted fallback for that single feature, or, only if many features are missing on browsers you must support, add a narrow polyfill. Most of the time the first option is the smallest change.
How to Debug Safari Without Guessing
- Turn on Safari's developer tools. On a Mac, enable "Show features for web developers" in Safari's advanced settings to get the Develop menu and Web Inspector.
- Inspect a real iPhone. Enable Web Inspector in the iPhone's Safari advanced settings, connect it by cable, and open it from the Develop menu on the Mac. You get a full console and element inspector for the phone.
- Read the console first. A single syntax error from an unsupported feature often explains everything. The same habit applies in Chrome, and our guide to DevTools features developers never open shows panels that speed this up.
- Check feature support tables for the exact Safari version your visitors use, not only the latest one.
- Test without a Mac if needed using a cloud device testing service, though local inspection is faster when available.
Frequently Asked Questions
Is Chrome on iPhone the same as Safari?
For rendering, mostly yes. Apple has long required iOS browsers to use WebKit, and alternative engines are allowed only in limited regions, so Chrome on iPhone usually shares Safari's bugs.
Which Safari versions should I support?
Check your own analytics. A common approach is the current version and the two before it, plus any older version that still sends meaningful traffic.
Can I test Safari on Windows?
Not natively. Use a cloud testing service, borrow a Mac, or connect a real iPhone to a Mac when you need full inspector access.
A Short Checklist Before You Ship
Before each release, open the site on one real iPhone and run through forms, login and any full height layouts. Use ISO date strings, guard optional APIs, avoid lookbehind if you support older devices, and set session cookies from the server. Those few checks catch most of the Safari only bugs I see. More browser behaviour explained is in our browsers section.
More in Browsers
Browsers
What Render Blocking Resources Are and How to Fix Them
Your page has a fast server, compressed images and a tidy bundle, yet users still stare at a white screen for a second and a...
Browsers
How the Back-Forward Cache Makes the Back Button Feel Instant
Press the back button on a well-built site and the previous page appears in roughly the time it takes to paint a frame.
Browsers
How Browsers Decide Which Cookies to Send With a Request
Most developers set a cookie, watch it appear in storage, and assume it rides along on every request after that. It does not.