Redirects is a widely used approach not only in Magento but in most of other web applications. Saying “redirect” we usually mean a rule or a set of rules for sending user from one URL to another. Using Magento 1 you can easily handle redirects by writing just one line of the code, but in Magento 2, because of its new architecture based on Dependency injection, the process of building a redirect is a bit more complex. Let’s review a new redirect creation by building a simple extension that redirects user from a category page to a product view page if there’s only one product in this category.
Do you know how to avoid browser styles and JavaScripts caching during the development process? Especially it will be useful to apply to the mobile devices. Sometimes, we have to recache our website’s look when there was made a significant style change. Our brief article describes an extension that will make those things possible.