Project

General

Profile

Actions

Bug #20423

closed

includeCSS and includeJS need extra parameter: urlParam

Added by Michiel Roos over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-05-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

includeCSS and includeJS need extra parameter: urlParam

I would like for the following to work so I can send 'far future expires headers' [1]:

page.includeCSS = COA
page.includeCSS {
file1 = {$stylePath}main.css?v1
file1.media = screen
}

But this does not work!

So I would like this to work

page.includeCSS = COA
page.includeCSS {
file1 = {$stylePath}main.css
file1.media = screen
file1.urlParam = v1
}

When I change the css or js file I can increment the version to v2 etc.

page.includeCSS = COA
page.includeCSS {
file1 = {$stylePath}main.css
file1.media = screen
file1.urlParam = v2
}

[1] http://developer.yahoo.com/performance/rules.html

Using get-parameters for css is not very clean, and actually browsers should not take anything following a ? into account when caching, even though most browsers do [2]. Using the suggested method will result in certain browsers not caching the file at all.

The right solution would be to versionize css files with the name, as suggested in [1].

[2]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.9
(issue imported from #M11088)

No data to display

Actions

Also available in: Atom PDF