m0rtimer
m0rtimer

Reputation: 2023

How to determine if a mobile browser is meta-refresh capable?

Many browsers in Japan (EZWeb, i-mode, etc) don't allow meta refresh, and in fact, they may display warning messages such as "This page uses newer technology and cannot be displayed" in place of your webpage.

How can I tell if a mobile browser does not support meta-refreshing so that I can take different action in those cases?

Thanks

Upvotes: 1

Views: 1315

Answers (2)

Brad
Brad

Reputation: 163232

The best option for something like this is to display a link on the page with the meta-refresh. The traditional "click here if the page doesn't redirect you in 5 seconds" kind of thing. That's what has been done for years in the PC realm.

You should also consider an HTTP 304 with the Location: header if you are just redirecting.

If instead you want a page to reload after a specific amount of time, then you are stuck. Without JavaScript, there is no other method you can use to automatically do this.

Upvotes: 1

Samuel Neff
Samuel Neff

Reputation: 74909

Without JavaScript you're really limited to User Agent sniffing. To provide the best experience I would recommend use known UA strings to only send the meta-refresh to browsers you know can handle it and for those that you don't know send a plain HTML response that has a link for users to click on to do the refresh.

Upvotes: 0

Related Questions