Styles without Http Request for StyleSheet

G

Guest

I need to absolutely minimize the number of round-trip requests for a page on
my site (because mobile phones will also be accessing it). I want to include
some global styles for all the pages of my site but I notice that if I make
them a <LINK>, the client-side browser needs to request that as a separate
object. Is there a way to do it so that the styles are pre-included in the
page before the page is delivered?

Alex
 
P

Przemek Ptasznik

Alex Maghen napisał(a):
I need to absolutely minimize the number of round-trip requests for a page on
my site (because mobile phones will also be accessing it). I want to include
some global styles for all the pages of my site but I notice that if I make
them a <LINK>, the client-side browser needs to request that as a separate
object.

Put styles in <style> element. But instead of round-trips you'll get
increased network traffic, because on each request you'll send
informations about styles. When you use <link> element there is an extra
roundtrip, but only once, because css file is held in browser's cache
and isn't downloaded everytime.
 
W

Walter Wang [MSFT]

I agree.

The linked stylesheet file is retrieved separately, but it's also can be
cached by the browser as a separate file; if it's used by another web page,
it probably will not be downloaded again if it's not modified after you
last retrieved it.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top