Mistakes? Everybody makes mistakes. It’s a human thing. If you don’t make mistakes, it means that you are doing nothing. The real challenge for you, as a web developer, is to avoid them every time you can.
Let’s say, that you have to develop app. Your main task is to provide support for all operating systems (Android, iOS and Windows Phone). What mistakes you have to avoid? What challenges are waiting for you? How to cope with them?
You are lucky. You really are. I will show you nine most common mistakes and their solutions. Some of them will be basic and another more advanced. Are you ready? Let’s get started.
1. Developing without research
You don’t know. whether it’s possible to include some particular feature in web app or not.
Many wasted hours, tons of frustration, unhappy client (or boss…).
- Copy function doesn’t work on Safari (iOS) and user hasn’t got possibility to copy content to clipboard. We have to tell him how to do it.
- Flash doesn’t work on mobile.
Identify your (or your customer’s) requirements and then check, if the targeted capabilities are achievable in a web app. Plan ahead. And succeed.
2. Using some HTML5/CSS3, which doesn’t work well on mobile or some devices
Assuming, that what works on desktop browser, will work on mobile as well, and using code, that doesn’t work on specific devices.
flexproperty causes problems on Android lower than 4.4 and iOS. The best thing you can do, is to find an alternative for flexboxes.
fixedproperty causes problems on mobile Safari – elements are placed too far, beyond the screen.
opacityproperty doesn’t work on inline display states (default for a tags) on WebKit browsers.
Example not working:
- Always check, if you can use a specific part of code or not.
- Remember about prefixes when using CSS (i.e. animation without
- Change the
- Use some great resources, like caniuse.com or html5test.com, to check what’s supported on specific devices.
You can also use media queries, for example:
3. Low resolution images on Apple’s Retina Display
Using only low resolution of images.
Images look fuzzy on Retina and pixelation may occur.
- Server has to recognize, if request is coming from a Retina device, and if so – provide higher resolution images.
- You can also use SVG as images format and web fonts.
4. Site loads on mobile in more than 3 seconds
Expecting, that everyone always uses WiFi connection, which has enough speed (high speed).
Traffic drop, lower conversion, complaining users (and they’re right!).
- Image optimization, Code compression, Database queries, CDN (Content delivery networks).
- You can also use AJAX to load some part of the website first or you can also put scripts at the bottom before
5. Mobile browser place focus on first input field on the website, even we don’t want that
Keyboard automatically shows up, if there is an input field on the screen.
Placing hidden input above our input.
We can use this part of the html code:
6. Forgetting about prefixes
For example, if you want to use
transition property, you should remember to use prefix
-webkit- before plain property.
height to 100vh
Mobile Safari interprets document length differently, than other browsers and it adds unwanted bar, which is difficult to be fixed.
8. Incorrect usage of
Let’s say, that you have used
input type="text" readonly and after clicking on it, navigation bar shows up. If we don’t want to enter text into that input, we should add to this tag
9. Creating web app only with only system (i.e. iOS) in mind
And now, last but not least, some thing you should do at the very beginning. Future users of your web app use different systems. Some of them have iPhone’s, some of them Android’s and some of them Windows Phone’s. You should plan your web app with them in mind. Otherwise, modifying web application, to work properly on all systems, can be time-consuming and very, very expensive.