473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

link rel or in my html file

Advantages one way or the other vs. link rel .css or including style
within style tags in my html file? I prefer the latter as I can then
use PHP in the style arguments and also still maintain/ use only one
file. Is there more to this?
Jul 20 '05 #1
2 2024
Nairb wrote:
Advantages one way or the other vs. link rel .css or including style
within style tags in my html file?
It's awkward to do some types of CSS hiding with embedded styles. The
stylesheet cannot be shared between different pages - so you've missed out
on a big bonus when it comes to cachability. The cachability is directly
tied to each page - which will probably reduce the cachability even
further.

I prefer the latter as I can then use PHP in the style arguments and also
still maintain/ use only one file. Is there more to this?


Well yes, external stylesheets are completely separate resources as far as
HTTP is concerned.

Apart from anything else, if all you want to do is run your stylesheets
through PHP, why not just do that?

<link rel="stylesheet" href="/styles/screen.php"...

Of course, the default caching headers that PHP supplies are probably
terrible for most stylesheet uses. What about using a preprocessor or
"funky caching" instead?
--
Jim Dabell

Jul 20 '05 #2
Nairb wrote:
Advantages one way or the other vs. link rel .css or including style
within style tags in my html file?
It's awkward to do some types of CSS hiding with embedded styles. The
stylesheet cannot be shared between different pages - so you've missed out
on a big bonus when it comes to cachability. The cachability is directly
tied to each page - which will probably reduce the cachability even
further.

I prefer the latter as I can then use PHP in the style arguments and also
still maintain/ use only one file. Is there more to this?


Well yes, external stylesheets are completely separate resources as far as
HTTP is concerned.

Apart from anything else, if all you want to do is run your stylesheets
through PHP, why not just do that?

<link rel="stylesheet" href="/styles/screen.php"...

Of course, the default caching headers that PHP supplies are probably
terrible for most stylesheet uses. What about using a preprocessor or
"funky caching" instead?
--
Jim Dabell

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: j erickson | last post by:
with the following xsl and xml file, the display of the gif file with the <image/url> tag works. However, the gif file in the <description> tag using the name attribute "src" won't make the correct...
1
by: Andrew V. Romero | last post by:
I have a script that I am working on for an intranet tool and in this script I have a form, which when submitted the onSubmit command calls calculate(). In this calculate function, I have it do...
1
by: Kenneth Montgomery | last post by:
I have this embedded dropdown menu applet that is suppose to be in the navigation frame and the target URL content in the content frame. But I can't seem to the script to put the content into the...
0
by: Rea Peleg | last post by:
link to configuration file prevents user control download to internet explorer Hi I have a simple web application which consists an opening html page with a (windows form user) control which...
6
by: Olly | last post by:
I've found a basic script, however I also need to add alt and title attributes as well, how would I go about doing this? Here's the script I found: Thanks <script language="JavaScript"> <!--...
1
by: Aki | last post by:
Hi! I've been trying to create a home link in a document that is shown in a frameset of two frames. My aim is to show the first documents that were shown in the frames when the frameset was...
26
by: Nospam | last post by:
I am trying to open a link in a new template window : <a onclick="windowopen('example.html','example');return false;" href="http://www.example.com" target="_blank"example link</a> such that...
38
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
12
by: prashant | last post by:
hi, i am trying to create an xml tag ref to hold link.php?id=1; or link.php?id=2 and so on. I want the links for all the fields(id) in the databse so that when i call them in my html page for...
4
by: henry | last post by:
Folks: As a follow-up to my recent posts, I want to ask some more general questions about multiple instances of a CSS link in a page as seen by browsers due to server-side file inclusion. Let...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.