A
A
akula222018-01-30 10:07:31
Yii
akula22, 2018-01-30 10:07:31

Caching not working when opening a site?

When loading the site, it takes a very long time to load, the pictures are drawn again, and so with each load, tell me what's wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
enchikiben, 2018-01-30
@EnChikiben

Pictures are cached by the web server, set the correct caching headers.

M
Maxim Timofeev, 2018-01-30
@webinar

And what does yii have to do with it? Set up caching in the browser, to do this, send the necessary headers, in addition, check the size of the photo. All this lies in the plane of the server and layout, yii has nothing to do with it.

A
akula22, 2018-01-30
@akula22

even the icons in front of the links are always redrawn, on other sites everything is fine, so this is not a browser. Pictures are small previews (
Headlines are

<head>
        <meta charset="<?= Yii::$app->charset ?>"/>
        <meta name="viewport" content="width=device-width; initial-scale=0.85; maximum-scale=0.85; user-scalable=0;"/>
        <meta name="yandex-verification" content="......"/>
        <?= Html::csrfMetaTags() ?>
        <title><?= Html::encode($this->title) ?></title>
        <?php $this->head() ?>

    </head>

Maybe something needs to be added here?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question