<a href="..." ping="https://example.com/pingreporter">Example link</a>
The download attribute allows for the downloaded filename to be specified to be something different than the name in the url.
This is available only on the
A tag when an
href attribute is already specified and works similarly to setting the header as:
Content-Disposition: attachment; filename="filename.pdf"
NOTE: this is not currently available in IE, Edge(prior to 13) or IOS Safari.
Once in a while, the web development community reintroduces old ideas in a new way. Years ago, there was a concept called ECML (E-Commerce Markup Language) that added an HTML attribute to identify values in a FORM that could be auto-filled from a users “virtual wallet”. Sadly, while it was implemented on a variety of websites (mine included), it was not widely supported and disappeared.
The concept has been reintroduced as values in the ‘autocomplete’ attribute in HTML5. Traditionally this attribute was only used to prevent auto-filling of values, now it can identify which values it is related to for pre-fill.
The usual payment, address and demographic fields (and variations of each) are supported.
^<input type="text" name="ccnum" autocomplete="cc-number" value="" />
Link prefetching is used to identify a resource that might be required by the next navigation, and that the user agent SHOULD fetch, such that the user agent can deliver a faster response once the resource is requested in the future.
<link rel="prefetch" href="http://www.example.com/images/sprite.png" />
<link rel="prefetch" href="/images/sprite.png" />
- MSIE 11+/Edge
- Firefox 3.5+ (for HTTPS)
In addition to dns-prefetch, you can take browser performance one step further by actually creating a new connection to a resource.
By initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, you allow the user agent to mask the high latency costs of establishing a connection.
- Firefox 39+ (Firefox 41 for crossorigin)
- Chrome 46+
<link rel="preconnect" href="//example.com" />
<link rel="preconnect" href="//cdn.example.com" crossorigin />
I often get into some fringe areas of micro-optimizations of website performance, DNS prefetching is another one of those topics.
To understand how this can help, you must first understand the underlying concepts that are used within the communications used to build your web page.
The first of these is a “DNS Lookup”, where the domain name (www.example.com) is converted into a numerical address, the IP address of the server that contains the file(s).
In many websites, content is included from other domains for performance or security purposes.
When the domain names are known in advance, this approach can save time on the connection as the lookup can fetched in advance, before it is required on the page to retrieve assets.
This can be particularly useful for users with slow connections, such as those on mobile browsers.
<link rel="dns-prefetch" href="//www.example.com" />
- MSIE9+ (MSIE10+ as dns-prefetch)/Edge
The HTML5 “async” attribute simplifies page-load performance improvements and dynamic script loading, it can be useful in modern web browsers.
<script src="example.js" async="async"></script>
This tag allows for activation of ClearType in Mobile IE for smoothing fonts.
<!--[if IEMobile]><meta http-equiv="cleartype" content="on" /><![endif]-->
NOTE: Future use of this approach is questionable, as MSIE10 dropped support of conditional comments, and HTML5 validators (in general) do not “like” the http-equiv values as they are not standardized
I recently found another element that is no longer supported for HTML5. The
<abbr> element represents an abbreviation or acronym, the
<acronym> tag was dropped in HTML5 and XHTML2.
Often it can be beneficial to ‘more’ uniquely identify your users. For applications this is trivial, but in a web browser this can be accomplished via only a few attributes.
- HTTP – User-Agent, IP Address, Content types and languages accepted.
- HTTPS/SSL – the keys and encryption methods available to a specific user may vary for each client configuration.
- HTML5 – local storage and capabilities supported.
- Geolocation – this is included in HTML5, but also supported in many clients without full HTML5 support, or via browser extensions.
- Java (Applet) – Installed version – this can often be used to get additional information regarding the client system directly from the VM or Operating System itself. (* Persistent Cookies possible)
- Flash – Installed version – this can often be used to get additional information regarding the client system directly from the Operating System itself. (* Persistent Cookies possible)
- Silverlight (for Microsoft Windows) – – Installed version and additional information from Operating System?
- GoogleGEARS (deprecated) – Installed version and additional information from Operating System such as Geolocation