Is it possible to remove ( not hide using display:none ) some part of HTML from source for mobile using Javascript or any server side technique?
For example suppose below is the code inside of one of the page of website
For example this is page for desktop Browsers.
Some content...
Demonstrating EM and STRONG
This text will have more importance>
<!-- .hs1 -->
<!-- .main -->
And using same page for Mobile devices I only want to remove
from the source.
I can't use different page because is CMS based. By updating content once I want to show on all devices. But in mobile version of Website I just want to remove (hide) some things from source. because If i will just use display:none mobile will load same amount of data of desktop version which is not for performance on mobile. Can we remove some specific part of source for mobile using Javascript or server side technique?
Edit after some responses
As many user commented that JavaScript cannot be used to reduce the payload to mobile users. So what could be the server side solution to deliver the same page but remove some part of it from source before delivering it?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)