I was overjoyed and cried with joy. Overview
I'm used to Apple's official aloofness. This time, Apple still didn't update any documents related to Safari or iOS, so all the data and information below are based on my own tests and the information released at WWDC. Safari on iOS 8
Compared to other mobile browsers, iOS 8 does not support some features:
iPhone 6 and iPhone 6 Plus iPhone 6 and iPhone 6 Plus are Apple's devices with different sizes and resolutions after iPhone 5. The parameters of iPhone 6 are For web developers, it’s not just the size on the ruler that’s different. It’s also the default
Regarding the screen size of the new iPhone, I recommend an article "iPhone 6 Screens Demystified". VIEWPORT SIZEYou who are reading this article should already know Until last week, all iPhones and iPods used a screen width of To adapt to the new iPhone, you can use the following two
Device pixel ratio iPhone 6 has So if you use a Icon size The iOS-specific icon size is To adapt to iPhone 6 plus, you need to add this paragraph
Startup Image If your webapp has a startup image, you have to add two more lines of code to adapt to the new iPhone. The image size for iPhone 6 is 750×1294, and for iPhone 6 Plus it is 1242×2148.
UA Detection Currently, all iPhones upgraded to iOS 8 use the same New API Two of the most important APIs have finally been added to iOS: You can test the 3D rendering effect on iOS 8 Safari with this FishGl from Microsoft.
IndexedDB is a new standard launched by W3C after the use of The Navigation Timing API is good news for web performance optimization. Through this API, we can measure more accurate loading and rendering time and optimize the user experience of web pages. New Safari Features Zoom When the iPhone is in landscape mode, or the iPad is in portrait or landscape mode, if you pinch the screen with your fingers (for example, if you want to zoom in on a webpage), you will enter a Cancel MINIMAL-UI Six months ago, Apple launched the Minimal UI mode. "Safari in iOS 7.1 added the minimal-ui attribute to the meta tag to hide the address bar and navigation bar when the web page is loaded." After the iOS 8 update, this mode was cancelled, but it still has the cool goddess style, and no one said why. Automatic form filling and credit card scanning Safari now supports auto-complete forms, and when Safari detects that you are filling out a credit card form, it will allow you to open the camera and scan the physical credit card directly. At the same time, Safari also supports the RSS! If your website provides RSS subscription, iOS 8 users can open it directly in the bookmark bar when browsing your website. It is the Toolbar Now the address bar and toolbar are semi-transparent. On iOS 7, only the address bar was semi-transparent. This means that the visible area of the web page is larger when it is first loaded (including the toolbar at the bottom). Updates on iPad After iOS 7, when you use Safari on iPhone to browse the web, the toolbar will automatically hide when you scroll (iPad will not), and iOS 8 iPad also has this detail change (both horizontal and vertical). The difference is that in landscape mode, iPad still has a small bar on it, while iPhone is full screen. In addition, Safari will keep the original Bookmark icons and frequently used websites Safari finally supports website icons attached to web pages in favorites and bookmarks. When you enter a keyword search in the address bar, the website icon will also be displayed (I just tested it on iPad but it doesn't work). Cross-platform switching If you use a Mac and an iPhone at the same time, when you browse a web page on your iPhone, you can continue reading it on your Mac (requires Yosemite) (this feature was specifically demonstrated at WWDC this year, and you have to wait for the official update of Yosemite). More like native webapp If you want users to jump directly to the Apple Store to download your app on the web page without confirmation, that is impossible. iOS 8 brings more convenience to interact between web pages and local applications.
New webview The most exciting news about the iOS 8 update is that hybrid apps share a common set of APIs with Mac, which means that iOS can also have more features, Mac and iOS communication and interaction, as well as:
The new webview (WKWebkit) is part of the new framework (WebKit.framework) and is not fully compatible with the old The current GM version (the public version is the same) still has a bug that prevents local files from being uploaded. For some hybrid applications (such as Cordova PhoneGap), this is good news. This means that iOS 8 currently has four web engines, which of course also means that compatibility and bugs are different. 1. Safari 2. Web.app (using full-screen desktop application) 3. UIWebView (old) 4. WKWebView (New) You can test the performance of your webapp here at HTML5Test.com. This change is very important for shell applications and webview applications, such as web applications in Chrome and Facebook native applications on iOS (Battery Doctor and Cheetah Mobile also use webview extensively). According to a report, Safari Plugin Safari on iOS 8 is the first system-installed browser that supports plug-ins and extensions (Firefox OS may also be one). Starting from iOS 8, local applications can be extended to interact with Safari, mainly through two ways: sharing (Share extension) and actions (Actions). Action can interact with DOM, which means that local applications can directly modify DOM elements. All plug-ins require users to actively select to trigger (need to click different buttons in the share to trigger), and there is currently no plug-in that can run automatically. The share menu of the old version of Safari has also been replaced by a JavaScript-based plug-in. For example, In addition to the features Apple demonstrated at WWDC, this improvement to Safari means that the browsing experience will be greatly improved. For example, you can directly log in to the account password saved in 1Password or LastPassword in Safari. If your iPhone has Touch ID fingerprint recognition, you can even log in directly with fingerprint verification. Pocket.com has announced that it will be releasing a widget for iOS 8 soon. Benefits for front-end developers and designers This time Safari has added a lot of support for HTML5 and CSS3
Animated PNG The APNG format is an extension of the PNG bitmap animation, but it has not been officially recognized by the PNG organization. It is somewhat similar to GIF (except that GIF is based on JPG), which means we can create 32-bit full-color semi-transparent dynamic images. Scrolling time difference and pull-down refresh If you have worked on a mobile project, you must know that iOS7 and earlier did not support This support allows us to create pull-down refresh and infinite pull-down download effects. Decimal point unit Safari now converts CSS units from integers to floating point numbers. This means that CSS object models such as At the same time, this also means that you can use half-pixel units.
SVG fragment identifier I haven’t played with SVG much, and I don’t understand this attribute, so let’s look at the English version first. Fragment identifiers from SVG is a method to link to one specific fragment or portion of an SVG instead of the root element. This feature allows us to sprite SVG images in one file taking advantage of one HTTP request and caching. Similar to CSS Sprites, but with SVG images instead and with ids instead of positions. CSS Compositing and Transformations The new attribute From the example demonstration on Adobe's official website, it seems that the deformation is effective, but the synthesis is not effective (it doesn't work on my Mac Chrome either). CSS Shapes CSS Shapes is also a new feature of Adobe. For this feature, I recommend "CSS Shapes 101" on W3Cplus. I am still very optimistic about the promotion and application of this feature, which can bring more possibilities to our web design. Image Source Set Developers who are familiar with responsive images should be familiar with this. With the popularity of high-definition screens, adapting to different resolutions is an issue that needs attention. Apple iOS 8 supports
In the above code example, the iPhone 6 Plus has a pixel ratio of HTML Templates Video Enhancement This update has many enhancements related to video playback. iOS8 starts to support Full screen playback of video element Safari does not support the full-screen playback API, even in iOS 8. However, this problem can be solved by adding a Video Metadata API Safari begins to support CSS Layering I can control other elements to be placed before iOS 8 JavaScript
Updated on September 18: Some developers have found that the Bugs and Problems After talking about iOS8 and iPhone updates, let’s talk about the bugs found so far.
Translator's Note The changes that iOS 8 brings to the web front-end are still very gratifying. With more powerful performance, more powerful browser and kernel, and more open interface, it can be foreseen that web applications for iOS will have a greater place. The article is very long and contains a lot of technical terms. It took me a long time to translate it. If there are any errors or inappropriateness in the translation, you are welcome to correct me and provide suggestions. renew September 26, 2014: After the iOS 8.02 update was pushed, the bug that Safari could not upload files was solved. This article was originally published as "iOS 8 and iPhone 6 for web developers and designers: next evolution for Safari and native webapps" Translated by @罗罗磊磊, please indicate the source when reprinting. |
<<: Mobile phone skin comparison: Samsung loves plastic, Xiaomi loves stainless steel
>>: Smart products debut at Shenyang International Mobile Phone Expo
Someone asked a question online: Soon, many netiz...
There is a saying that is often circulated on the...
Like most cats, lynxes are typical solitary anima...
Case: A reader asked about a financial management...
There are 40 days in the dog days of 2020 Today i...
Making cars can no longer satisfy Baidu. On Augus...
MacRumors quoted many netizens as saying that App...
This is the second in the Android background kill...
Let’s get down to earth and look at how “ user op...
Yesterday (February 19), Juneyao Airlines From Sh...
On June 27, the Office of the Leading Group for R...
What are the reasons why there are no users after...
Why do my feet become numb after squatting in the...
Audit expert: Zhang Yuhong Chief Physician of Der...
On November 28, 2014, Hubei Provincial Economic a...