Search code examples
htmlcssvelo

how does wix use mobile and desktop css?


I noticed something interesting on wix that i couldn't get figured out.

When im on desktop (width 2560px) and i load the wix page. I see a page as normal. But here comes the interesting part. when i make the screen size smaller, i tested 2 ways, by inspect mode by going 320px in width. Or by making my browser window smaller. The CSS doesnt change to mobile. It only changes when i refresh the page.

And it works vice versa. So after i refreshed the page and go desktop(width 2560px) mode again i keep the mobile CSS. Until i.. you guessed it, refresh it again.

So, im new to this kind of magic and im wondering how this works and how to use it.

Also as a side note; Does this improve the SEO and page load speed?


Solution

  • In Regular sites (Not Editorx), Wix calculates the css in the server based on the device. So changing the resolution doesn't change what the server already responded. That's why it works after refresh.

    Notice that if you shrink the window and run wix.com, you still get the desktop site. Only if you emulate a mobile device, only then you'll get the mobile version.