Tag Archives: programmer

Things that can be cached in WordPress Cache

WordPress Cache What can be Cached and How We Do it

Caching is one of technologies which can contribute to site speed. Besides, caching will enable your stored data to be available for future requests. Some web developers might be familiar with it, some might not. But, if you haven’t been familiar with caching, you can learn more about it in this article. This article will explain what WordPress cache is and how it can be implemented on many different levels.

What is Caching?
In computing, the word “cache” is quite familiar. It refers to software or hardware component which is temporarily used to store values and retrieve them faster in the future. Values include MySQL queries, or compiled PHP bytecode as well as duplicate data, such as HTML and images.

In fact, we can gain a significant performance advantage by making copies of data and placing them in the “caching” component. This is because your visitors can retrieve cached content much faster than un-cached. Besides, your performance improvement can enhance depends on how much data that you can cache.

Things that can be cached
There are several levels, depending on how far you want to go in optimizing your website using caching. Here they are:

  • HTML Output
    You can find many plugins that can help you cache the HTML page itself. For instance, you can use WP Rocket and W3 Total Cache that can perform cache and many more. These plugins cache the result of the HTML output saving time for future requests. In fact, you can serve uncached content for every plugin have a cache invalidation mechanism.
    You can also try to “minify” HTML to make it smaller. This will add up a couple of kilobytes per page and keep increasing over time.
  • PHP OpCache
    A technique which PHP takes the source PHP files and compiles them into an intermediary form called bytecode is named OpCaching. Bytecode is like a computer’s machine code, but it refers to machine code that is executed by a “virtual machine” rather than by a real one. Fortunately, it can be executed quicker than having the PHP interpreter parse a command at a time since it is machine code and resides in memory.
    At a certain level, caching stores these bytecode data into memory, this causes your application gets executed faster. Besides, in order to have PHP OpCache enabled, you need to have access to the PHP configuration file.
  • PHP Object Cache
    This cache is done on the language’s OOP level. It uses the concept of “objects” to describe logic, data, and ideas. Objects are constantly being created and destroyed as your application runs. This technique solves the problem by caching the objects themselves.
    You can find PHP object cache in Memcached and the assorted ones for Redis. However, in order to enable PHP Object caching, you need to have access PHP configuration.
  • MySQL Query Caching
    The idea might be the same with PHP object cache, unless it is applied at a database level. A set of data are returned by the database based on the query that was entered. In fact, someone can get data much faster if someone has called the same data first. This is because they would reside cached in memory. But, you need to have access to the database server.

5 UI Choices that Damage UX

7 UI Choices That Damage UX-01

User experience is one of the most important factors from every product and UI has become one of the elements that can determine great UX. However, not all UI are great for UX as some UI will bring bad effects for your UX. Yet there are still so many websites that push certain design trends which actually cause negative UX. Some web designers may not understand that some UI may be bad, but some may do it on purpose. So, if you don’t know which kinds of UI that is good or bad for your UX, you better read several points below.

  1. Unwanted Modals
    The idea of a modal window is a smart concept. It allows developers add concept over the page without the need to open a new tab. But the real problem is the unwanted modals not the modal windows for they always drag down the user experience. In fact, you can find three different types of “unwanted” modal popups:
  • Exit intents which open when the user’s mouse leaves the page body, usually hovering the browser tab,
  • Timed modals that open after a set amount of seconds;
  • Scroll modals that open after the user scrolls a certain distance down the page.

From the above information, you need to re-think whether it’s worth it to apply an unwanted modal popup to your website. For it will annoy your users to get a higher conversion rate. But these unwanted messages also give modals a bad name, which is tough because they serve a real purpose in UI design. These can be used wisely, like with modal signup fields or information-based modals triggered from a user’s mouse click. Or you can make it annoying by just make it appear from out of nowhere.

  1. Guilt in Copywriting
    Guilt copywriting which appeared in modals had become a trend for years ago. This kind of copywriting annoys users but increase signups. You can find this type of copywriting in many sites. In fact, this writing can also appear in sidebar fields or in-content opt-in forms. This copywriting will make you feel guilt instantly as you close the window. For example, the subscribe button looks ordinary, but the cancel button might read “No thanks, design is not my hobby”. This strategy might work well from a marketer’s standpoint, but certainly holds little value from a UX standpoint.
  1. Slide-In Ads/Offers
    Sometimes in web you will find a small box slide into view from the side. This box is usually a feedback box for user testing, or it might be social sharing links or even a discount promotion. This is a good idea to get user’s feedback. But just don’t use it too much, at least 2 different slide-in boxes on either side of the page, not 3 or more.
  1. Nav Menus Without Padding
    Navigation menu in every site usually has padding around them. But, you’ll find that some padding isn’t clickable unless you click on the exact block area of the text itself. You need to take 30 seconds to move CSS padding from a link’s container element to the link itself. Even though, the navigation is still the same, but now users can click the link and the space around the link.
  1. Paginated Listicles
    Another UI design which can damage your UX is content with one-item-per-page listicles. This is because few persons will enjoy clicking the “next” button constantly to read through a clickbait post. Unfortunately, there are many websites that use this kind of UI. It is mostly about page views and ad revenue more than anything else. So, it needs not only the work of designer but also the work of webmasters to prevent any multi-paged articles.

MySQL 5.7 Reference Manual

My SQL

Nowadays, MySQL is the most popular database system used with PHP among so many developers. PHP combined with MySQL are cross-platform which you can develop in Windows and serve on a Unix platform. Basically, tables stores the data in a MySQL database. A table consists columns and rows which is a collection of related data. Databases are useful for storing information categorically. My SQL is an open source relational database management system (RDBMS).  So, whether you are a mobile or web developer, it is never too late to learn more about MySQL 5.7. Here are the details and don’t hesitate to check them out!

MySQL has supported for full-text indexing and searching, such as follows:

  • A full-text index in MySQL is an index of type FULLTEXT.
  • Only with InnoDB or MyISAM tables, you can create Full-text indexes, and can be created only for CHAR, VARCHAR, or TEXT
  • As of MySQL 5.7.6, My SQL provides a built-in full-text ngram parser. It supports Chinese, Japanese, and Korean (CJK), and an installable MeCab full-text parser plugin for Japanese. Parsing differences are outlined in Section 13.9.8, “ngram Full-Text parser”. Then, Section 13.9.9, “MeCab Full-Text Parser Plugin”.
  • CREATE TABLE provides A FULLTEXT index definition or adds later using ALTER TABLE orCREATE INDEX.
  • To load large data sets faster, you can use a table that has no FULLTEXT index. Then, create the index to load data into a table that has an existing FULLTEXT index.

By using  MATCH() … AGAINST syntax, you can perform full-text searching. MATCH() takes a comma-separated list that names the columns to be searched. You can use AGAINST to take a string and an optional modifier that indicates what type of search to perform. Create search string that is constant during query evaluation through string value. This rules out, for example, a table column because that can differ for each now.

There are three types of full-text searches:

  • A natural language search interprets search string as a phrase in natural human language. There are no special operators. The stop word list applies if the modifier gives or not give the IN NATURAL LANGUAGE MODE. Full-text searches are natural language searches.
  • Using the rules of a special query language, a Boolean search interprets the search string. The string contains the words to search for. It can also contain operators that specify requirements such that a word must be present or absent in matching rows. It also should be weighted higher or lower than usual. In Boolean search interprets, search index will omit certain common words. Besides, some words do not match if present in the search string. The IN BOOLEAN MODE modifier specifies a Boolean search.
  • A modification of a natural language search is a query expansion. To perform a natural language search, you can use search string. After adding the words to the search string, then words from the most relevant rows returned by the search. The search is done again. From the second search, the query returns the rows.