N
N
Nikolai Eremeev2018-02-09 16:20:07
JavaScript
Nikolai Eremeev, 2018-02-09 16:20:07

Remove video loading in responsive layout?

Good afternoon! Can you please tell me how not to upload videos at all with adaptive layout? Hide via media screen with "display: none" is not an option, because the video is hidden, but it still loads, which slows down the page loading.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kuznetsov, 2018-02-09
@Nere

Here it is better to do this: We get the screen resolution in JS and if it is less than necessary, we remove the video code from the site page.

A
Alex-1917, 2018-02-09
@alex-1917

1. Find the video block in the template code.
2. delete what you found in step 1
3. find in JS the part of the code responsible for showing what we deleted in step 2
4. delete what you found in step 3
5. pour yourself and me a glass of cognac.
6. enjoy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question