V
V
Vadim Belkin2015-09-04 10:09:02
MySQL
Vadim Belkin, 2015-09-04 10:09:02

What are the advantages of switching the view of the product catalog with a page reload (different layout for each view)?

I noticed that on most sites where in the catalog there is a switch in the type of product display (tile, list, table), the type change occurs with a page reload, or rather, with a change in the layout of the product list (for each type, the product has its own layout). Even if there is no reload, the new list is simply loaded dynamically and replaces the current one. Implementation is possible through changing the class of the container with the goods, depending on it, the appearance of the goods will change. And it switches quickly and without loading or reloading the page. I understand that in some of the views a lot of information about the product is displayed, and in some, only the name and price with a button, and in order not to carry this bunch of text, such an implementation is possible. But are there any other reasons to make everything a different layout?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Melnikov, 2019-03-25
@immelnikoff

SELECT * FROM table_name WHERE
year = (SELECT MAX(year) FROM table_name);

D
Dmitry Kovalsky, 2015-09-04
@dmitryKovalskiy

It all depends on the qualifications of the developers and the architecture of the system. For example, it is possible that the CMS used simply does not have such a feature. Also, if the customer wants a direct link to this page in the selected state - not every specialist can master the history api - it's easier for some to do GET. There are not many options in general.

L
Lenar Fattakhov, 2015-09-04
@fr_end

In some cases, the layout of different views differs too much to just change the container class.
For example, look here triko.ru/categories/dlya_detej
There was a task to make it so as to change the view without reloading. But the grid view and the table view don't have much in common, and that would be a big pain in the ass.

V
Vitaly Inchin ☢, 2015-09-04
@In4in

Implementation is possible through changing the class of the container with the goods, depending on it, the appearance of the goods will change.

Another reason is the capacity of each type. If you show the content in a table (for example), you should load more cells than when showing everything in large blocks.
Also, the fact that there are a number of users on this planet who disable JavaScript in their browser can be considered a reason. There should be a native way for them to switch. And lazy developers, in order to "work for everyone" refuse the JS version.
Well, in general, yes - extra data is the main reason (as well as the size of the uploaded images).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question