G
G
grabbee2020-09-05 22:03:26
Nginx
grabbee, 2020-09-05 22:03:26

The site is very stupid, although the server is not loaded and there is enough speed?

SPA Vue Nuxt website. Now I'm trying to solve this problem. Attendance is now low. Almost no load. But brakes at transitions up to 1 minute often happen. CloudFlare caches all responses in front of the site. Now I'm trying a new NGINX config to additionally cache statics

location ~* ^.+\.(css|js)$ {
        expires modified +5d;
    }
    location ~* ^.+\.(jpg|jpeg|gif|png)$ {
        # add_header Access-Control-Allow-Origin *;
        expires 5d;
    }


It might help. I don't know.

Interesting. On a laptop, such brakes are almost never observed, while on a phone these friezes are very noticeable (up to 1 minute) - and the page may not be rendered at all. Need to reload. When you walk through the pages, then there are already fewer friezes. And the site starts working as it should.

# UPD

And before and after the Yandex Metrica script is executed for 15 and 20 seconds, respectively

5f54744c6a9c4837744707.png

. These are the pieces that pull. I removed dynamic import.
For a new page, it pulls JS and CSS - here 20 seconds

Yandex

5f5475622ee75347599698.png
5f54756d14605290142783.png

Maybe I didn't integrate it correctly.
Used "@nuxtjs/yandex-metrika": "^1.2.0" - configured according to the instructions

Always matches the Metrika script

Maybe just a coincidence
5f547ad280b14402531331.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grabbee, 2020-09-13
@grabbee

The problem was in the Metrica counter. Perhaps the jamb of the module through which it is connected. In general, Webvisor is not compatible with the SPA, as I understand it. It starts sending its requests during transitions and blocks the loading of scripts and styles. Accordingly, we have a problem. DEFER did not help, as it further complicates the integration of the counter. Turned off Webvisor and it seems to be better. He also blocked the download of both Fonts and Pictures on the page. Completely broke everything, but randomly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question