Answer the question
In order to leave comments, you need to log in
How to load another html file with small screen resolutions?
There is a desktop version site, it is necessary that at a screen resolution of, say, 500px, another html document is loaded. With styles, everything is clear, they can be combined and much more, but what to do with html?
Answer the question
In order to leave comments, you need to log in
Either a JS script is fired first on the page, which decides which html to load, or the server part generates the required html depending on the client's screen resolution.
Let's say this:
<script>
if (window.innerWidth <= 500) {
location.href = '/mobile.php';
}
</script>
/mobile.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question