Disadvantages of client side routing?

I am creating a universal / isomorphic javascript application (Express / Redux / React). I am considering routing on the client using React Router and / or routing on the server using Express.

I know that client-side routing has become popular in single-page applications because they make user interaction smoother.

However, I try to better understand client and server side routing. What are the potential disadvantages of client-side routing that may arise when creating any application (single page or not)? And when is the best time to consider server routing? Do large-scale applications do exclusively on one side (client / server) or do they often mix the two?

Thanks!

+4
source share
2 answers

I see no good reason to stay away from client-side routing. If you use something like a jet router, then this is both client and server routing, and there’s nothing complicated about it. Some specific areas that some people can tell you about will be difficult:

  • SEO. It's free, any URL that you click will be displayed on the server correctly and sent to the client, so Googlebot will see the page correctly. There is absolutely no truth in assuming that SEO is more difficult with client-side routing, provided that you are on the server side.
  • . , ga('send', 'pageview', path) , ( ).
  • , , , . (, webpack). , .

( ) . , JavaScript ( , Google ). , , - .

+3

( ):

  • , , , .

  • . -, , HTML .

  • SEO-. , .

  • . , , , .

  • . , , .

, .

, SEO SPA (, ), .

+1

Source: https://habr.com/ru/post/1606688/


All Articles