$.ajaxPrefilter(function (options, originalOptions, jqXHR) {
// you can use originalOptions.type || options.type to restrict specific type of requests
options.data = jQuery.param($.extend(originalOptions.data||{}, {
timeStamp: new Date().getTime()
}));
});
Safari Overflow Hidden Problem
There may be times when you need to
hide the overflow (scrollbars) being visible on a page. You can specify
to have all scrollbars hidden or the x and y scroll bars separately.
When trying to hide the overflow of a project I was working on I
realized that the ‘overflow:hidden’ was not working on the Safari
browser. This was very frustrating because it worked on all other
browsers except Safari. Well, there is a very simple solution to solve
this problem… All you have to do is set that element to have a relative
position. For instance, if you were to specify for the body to hide the
horizontal scrollbars you would want to have the following css in your
stylesheet:
body {
position:relative;
overflow-x:hidden;
}
iOS 6 Beta 1: HTML5 new APIs, Remote Debugging and native apps integration
Public new features for Safari on iOS 6
File uploads
Finally! We can now select an image from the Photo Library or opening
the Camera from a web form. The question is about HTML Media Capture
being implemented or not (see later for the answer).
Web Audio API
With the Web Audio API we can enhance HTML5 games and multimedia apps with mixing, filtering and processing operations through JavaScript.
CSS Filters
CSS 3 Filters
a set of image operations (filters) that we can apply using CSS
functions, such as grayscale, blur, drop-shadow, brightness and other
effects. These functions will be applied before the content is rendered
on screen. We can use multiple filters using spaces (similar to
transforms).
Smart App Banners
It’s a way to connect websites to native applications. When you
browse a web that has a related native application, Safari can show a
banner inviting the user to install or open the native app. The website
can also send parameters to the native app. It’s not clear how this is
going to be implemented. My guess is through meta tags. The same
behavior is available on Internet Explorer 10 for Windows 8.
Full Screen support on landscape
When you orient your device in landscape mode you can then move to a
full-screen mode, including hiding the status bar and the Safari toolbar
at the bottom. Transparent buttons are replacing the toolbar. A similar
behavior is available on Nokia Browser for Symbian. It’s not clear at
this point if we can use the FullScreen API to request the feature (see
later for the answer)
Remote Web Inspector
This is a big feature. Announced as a very small feature in the new
APIs for developers. In the keynote there was no other information. As
you may know, I’ve developed iWebInspector for iOS 5
because of the lack (or the hiding) of a web inspector tool for
debugging web apps. It’s not public if this new Remote Web Inspector
through LAN (like BlackBerry Remote Web Inspector) or through USB (like
Google Chrome for Android)… the answer, later in this post.
Crossfade CSS Function
This feature was published in the keynote with “font-face: 3px” but
I’ve seen it. It’s an image function that will create a crossfade
between two images (Spec draft), for example:
1.
background-image
: -webkit-cross-fade(
url
(
"image1.png"
),
url
(
"image2.png"
),
40%
);
Will it work with transitions?
Other announced features and questions
iCloud Tabs
You can synchronize your tabs between all your devices, including
Macs, iPhones and iPads. So the same URL will be distributed through all
devices. Be careful on your mobile web architecture!
Offline Reading List
when the user adds a page to the reading list it will be also
downloaded and precache. Is there any API to know if our page is being
executed from the cache?
Maps
Google Maps native app was replaced by a new Maps app (directly from
Apple). The question is, is this app still capturing
http://maps.google.com URLs? (I hope not) and how to open the native app
or driving instructions from a web.
Twitter and Facebook
Both social networks are not integrated in the operating system. It
will be good if at some point web apps can also use these credentials.
Questions from the past
WebGL? IndexedDB? getUserMedia (camera access)? Nitro engine on Web Views?