Monthly Archives: May 2020
"There has been an error processing your request" is one of the most common Magento 2 error messages you can receive when working with Magento 2. Here is an example of this message:
Magento 2 Rocket JavaScript extension allows you to enable deferred JavaScript loading and move JS code to the bottom of the page automatically. That way you increase the website loading speed and eliminate render-blocking.
However, sometimes you don't need to move all JavaScripts to the bottom since there are some that aren't recommended to be moved there.
In this guide you'll learn how you can do that.
How to Defer Some JS Loading Automatically?
Navigate to Stores > Configuration > Magefan Extensions > Rocket Javascript and find the Ignore Deferred JavaScript With section. Then specify the strings you don't want to be moved to the bottom, each in a new line.
The extension will add data-rocketjavascript="false" attribute to them automatically so they will be ignored.
How to Defer Some JS Loading Manually?
In case you don't want to move some JavaScript to the bottom you just need to add the attribute data-rocketjavascript="false" to the <script> tag directly in your code:
Example:
Let's
The 1st place in Google SERP is a dream place every website is working hard on getting to. As plenty of studies show you'd probably click on the first 3 results Google gives for your query with little or no regard to the rest. Being at the top 3 is great, but still, the 1st place gives you far more authority and credibility. You have to be really good so that Google has the reason to put you there, right?
Your website or webpage success on Google is based on SEO, so everyone desperately wants to learn how to improve it. Consequently, those who've ever learned about SEO know how many things it is influencing and how many things you have to take care of in order to improve it on your website.
So, in order to outrun the competitors to improve your website SEO you have to:
- Work hard on creating unique and useful products.
- Do your research to target top-ranking and long-tail keywords.
- Create informative and engaging content.
- Pay a lot of attention to the MetaData.
- Build
Basic Linux Commands
pwd - displays information about the current location in the file system (the path of the directory (folder) you are in);
dir, ls - shows a list of files and folders in the current directory;
cd - (change the current directory) allows you to move to another folder;
Example:
cd ../ - will move to a folder on a higher level;
cd foo - will go to the child folder "foo";
cd /var - will go to the "var" folder located in the root of the file system;
touch fine_name - create a new file named "fine_name";
mkdir dir_name - create a new folder "dir_name" in the current directory;
rm file_name - delete the file "file_name";
rm -r dir_name - delete the folder "dir_name";
cp origin_name new_name - copy files and folders;
mv old_name new_name - move files and folders;
ln -s origin_name link_name - create a symbolic link;
If you already use WebP images for your HTML <img> tags and want to enable WebP for the CSS background as well, the proper way is to use multiple backgrounds in the CSS styling.
For example, you have an element with .png CSS background:
.minicart-wrapper .action.showcart.desktop .fa-shopping-cart:before {
background: url(../images/icon-cart.png) no-repeat;
}
To switch it to the WebP, you need to convert PNG/JPG/GIF image to WebP image manually using one of the free tools on the Internet. Save it in the same folder and use CSS like this:
body.webp-supported
.minicart-wrapper .action.showcart.desktop .fa-shopping-cart:before {
background: url(../images/icon-cart.webp) no-repeat;
}
body.no-webp .minicart-wrapper .action.showcart.desktop .fa-shopping-cart:before {
background: url(../images/icon-cart.png) no-repeat;
}
In this case, all browsers will get WebP images, except for ones that do not support WebP. They will load the .png image.
Note: if you use Magento 2
It is proven that information is perceived better by watching videos than reading a long one-piece text. Magento websites are not an exception. So, it's your cue to consider adding videos to your content, too.
There are multiple options to add YouTube videos in Magento. Starting from the default means and moving on to the advanced tools with video rich snippets, you can find the best solution for your needs.
Today, we'll cover both options to make your journey easier. Their features and performance metrics vary, so there's a lot to unveil.
Ready to get started?
How to Add YouTube Video in Magento?
You can use the WYSIWYG editor or page builder for content management. Fortunately, both of them offer a media tool to add audiovisual elements.
So, to add a video in Magento:
1. Navigate to the place where you'd like to insert a video and click on the Insert/edit media icon on the editor's toolbar.
2. Enter the video's link in the Source folder and specify its Width and Height in the General