Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

including respond with conditional comment to work with static cache #101

Closed
s-leger opened this issue Nov 20, 2014 · 4 comments
Closed

Comments

@s-leger
Copy link
Contributor

s-leger commented Nov 20, 2014

Hi,
Including content via typoscript [condition] disallow use of static file cache.

includeJSFooterlibs  {
        jquery = {$page.includePath.javascript}Libs/jquery-1.11.1.min.js
        jquery.forceOnTop = 1
        bootstrap = {$page.includePath.javascript}Libs/bootstrap.min.js
        responsiveimages = {$page.includePath.javascript}Libs/jquery.responsiveimages.min.js
        main = {$page.includePath.javascript}main.min.js

        #############################################
        #### INCLUDE RESPOND JS FOR IE DINOSAURS ####
        #############################################
        #### NOTE : add conditional comment to cope with static cache
        respond = {$page.includePath.javascript}Libs/respond.min.js
        respond.allWrap = <!--[if IE 8 ]>|<![endif]-->
        respond.excludeFromConcatenation = 1
        respond.disableCompression = 1
    }
@suburbanworrier
Copy link

This isn't a typoscript [condition] but a CSS condition. It gets rendered whatever so doesn't affect your static file cache.
c.f. http://css-tricks.com/how-to-create-an-ie-only-stylesheet/
HTH

@s-leger
Copy link
Contributor Author

s-leger commented Nov 24, 2014

Yes,
i'ts not the original code, but a version i'd like to see.
The original as in /Configuration/Typoscript/setup.txt line 458:

#############################################
#### INCLUDE RESPOND JS FOR IE DINOSAURS ####
#############################################
[browser = msie] && [version = 8]
page.includeJSFooterlibs.respond = {$page.includePath.javascript}Libs/respond.min.js
[end]

@suburbanworrier
Copy link

Ah, I'm sorry. I clearly didn't look at the original code.

@benjaminkott
Copy link
Owner

@s-leger @suburbanworrier wow, sry just made the adjustments commentless was a bit busy during the 7.0 release. thx a lot for the hint. i just took your code - its awesome, i did not know that this was possible that easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants