1
I am working on a new website project, where some areas will need a special html treatment for presentation. For example: for the desktop, we have a 1920x800 image carousel, while on mobile, I want to work with a 768x1024 carousel.
They are different images and not to overload the load, I would like to deliver the correct version for each access device [mobile, desktop]
My idea was to use asynchronous loading via javascript, where I detect the window.width and check if the screen is larger or smaller than 1024px. From this result, I search via ajax the appropriate html content.
I would like to know if you know/know of other means to reach this result. Thank you!
Use bootstrap but the name of what you want specifically is called 'css media query'
– Jasar Orion
You should see was the width of the device (768px) and not the height. That is, see if it is less than or equal to 768px.
– Sam