BEM Methodology : Introduction

BEM stands for Block Element Modifier.

Blocks, elements, and modifiers are all called BEM entities.

It is a notion that can be used both to refer to an individual BEM entity and as a generic term for blocks, elements, and modifiers.

BEM methodology was invented at Yandex to develop sites which should be launched fast and supported for a long time. It helps to create extendable and reusable interface components. (Source)

What is BEM Methodology?

When you are building smaller websites, how you organize your styles is usually not a big problem. You create your usual files, write all the needed CSS, and that’s all.

However, when it comes to larger scale, complex projects, how you organize your code becomes crucial.

How the code is structured is even more important if you are working in a team consisting of multiple front-end and back-end developers.

BEM Methodology will substantial improve code maintainability and speed up the development process

Today, there are plenty of methodologies with the aim of reducing CSS code and making your CSS code more maintainable. In this article, I am going to explain and provide a few examples of one of them: BEM.

The main idea behind it is to speed up the development process, and ease the teamwork of developers by arranging CSS classes into independent modules. If you ever saw a class name like header__form--search, that is BEM in action. Yes, classes can be named very long, but they are all readable and understandable Read more…


Web Server Error Codes

Code Name Description
0 Server Error No connection to the server available or the server was unavailable.
300 Multiple Choices The requested resource corresponds to multiple representations, each with its own specific location, and the negotiation information is being provided so that the user can select a preference and redirect its request to that location.
301 Moved Permanently The requested resource has been assigned to a new permanent URL.
302 Moved Temporarily The requested resource resides temporarily under a different URL. Clients should continue to use the URL since the redirection may vary.
303 See Other The response to the request can be found under a different URL. The new URL is not a substitute reference for the originally requested resource.
304 Not Modified If the client has performed a conditional GET request and access is allowed, but the document has not been modified.
305 Use Proxy The requested resource must be accessed through the proxy given by the location field.
400 Bad Request The request is not understood by the server due to an incorrect syntax.
401 Unauthorized User authentication is required.
403 Forbidden The server understood the request, but is refusing to fulfill it.
404 Page Not Found The server has not found the URL requested.
405 Method Not Allowed The method specified in the Request-Line is not allowed for the resource identified by the Request-URL.
406 Not Acceptable The server is not sending a response that the requestor is willing to accept.
407 Proxy Authentication Required The client must authenticate itself with the proxy (similar to Unauthorized).
408 Request Timed Out The client did not produce a request within the time that the server was prepared to wait.
409 Conflict The request was not complete due to a conflict with the current state of resources.
410 Gone The requested resource is no longer available at the server and no forwarding address is known (similar to 404, but 410 is permanent).
411 Length Required The server refuses to accept the request without a defined content-length.
412 Precondition Failed The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.
413 Request Entity Too Large The server is refusing to process a request because the request entity is larger than the server is willing or able to process.
414 Request-URL Too Long The request entity is larger than the server is willing or able to interpret.
415 Unsupported Media Type The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.
416 Requested Range Not Satisfiable The request included a Range request-header field, and not any of the range-specifier values in this field overlap the current extent of the selected resource, and also the request did not include an If-Range request-header field.
417 Expectation Failed The expectation given in the Expect request-header could not be fulfilled by the server.
500 Server Error The client?s Web server is incapable of performing the request.
501 Not Implemented The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
502 Bad Gateway The server received an invalid response from the upstream server that it accessed in attempting to fulfill the request.
503 Out of Resources The server is unable to handle the request due to a temporary overloading or maintenance of the server.
504 Gateway Timeout The server did not receive a response in time from the upstream server specified by the URL.
505 HTTP Version Not Supported The server does not support the HTTP protocol version that was used in the request message.

Happy Coding 🙂

Open-source JavaScript hosted libraries

I was searching on internet for JavaScript library and I came across very useful link. Here you can find all latest and stable version of open source JavaScript libraries for your development purpose on one place:

Open-source JavaScript hosted libraries

Happy Coding 🙂

Auto Update Copyright Year using JavaScript

Copy the script code below and paste it into your website where you want your copyright notice to appear.

<script language=”javascript” type=”text/javascript”>

document.write(‘©’ );


document.write(new Date().getFullYear());


Happy Coding 🙂

How to detect browser name and version using javascript or jquery in

 navigator.sayswho = (function () {
 var ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
 if (/trident/i.test(M[1])) {
 tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
 //return 'IE ' + (tem[1] || '');
 return { name: 'IE ', version: (tem[1] || '') };
 if (M[1] === 'Chrome') {
 tem = ua.match(/\bOPR\/(\d+)/);
 //if (tem != null) return 'Opera ' + tem[1];
 if (tem != null) { return { name: 'Opera', version: tem[1] }; }
 M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];

 if ((tem = ua.match(/version\/(\d+)/i)) != null) {
 M.splice(1, 1, tem[1]);
 alert('Browser Name: ' + M.join(' and Version # '));
 return M.join(' ');

Copy above code and paste it into notepad and save notepad as .html file. Now open .html file and you will see the result.