For our weekly blog this week, we are assigned to research html elements we can implement in our websites that will remain constant in all browser types. We also are discussing whether its okay to implement these elements that may not work on every browser type.
So let’s get right into it! so to start off, how can you accomplish optimizing your code to different browsers, and what do you call the steps to do so?
“When you want to serve different content to different browsers, detecting the actual browser type and version itself is the wrong way to go in most cases. It is much better to detect whether the browser supports the technologies your web site is using — referred to as feature detection.”
“Feature detection – the idea here is to query the browser to detect whether it supports the features our content relies on, and then serve content as appropriate.”
This is certainly one way to accomplish browser optimisation, but it gets even simpler when you use resources that are already out there to do all the work for you.
Let’s say your viewer doesn’t have the font that you have used on your website. How can you optimise your website to create the aesthetic you are intending to show to them? Websites such as FontSquirrel.com or GoogleeFont.com will automatically give you the code you need to put in your website so that your viewer is able to see the specific font you are using.
Other elements may not have the same kind of resources that provide support for different browsers, so is it okay to not apply these?
Well the short and blunt answer to this is, if you don’t want to look like an idiot to the oldies that don’t wanna upgrade, then no… It isn’t okay. Most people these days update their browsers automatically, but not everyone. And to cater to all, we also must cater to the few.
so by modifying content with inner HTML and other techniques that use feature detection all browsers will be able to identify the elements in your websites!
So that’s all for today. Is there any other way to optimise content? Please let me know! I still hae a lot to learn!
Happy coding ❤