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

Routes should also work with "real files" #19

Open
creativedutchmen opened this issue Jan 17, 2013 · 1 comment
Open

Routes should also work with "real files" #19

creativedutchmen opened this issue Jan 17, 2013 · 1 comment

Comments

@creativedutchmen
Copy link
Member

Since we are trying to move from .htaccess to php routing, it would be very convenient if this extension was also usable for routes to static assets like JS and CSS files.

For instance, it is bad practice to request your styles with a querystring: style.css?v=204, incorporating it into the name is better: style-204.css. This is because some caching proxies will not cache the file when there is a query parameter present.

However, to do so a route is needed (a redirect will not work, as then the destination will still be cached), but at this moment routes only work for Symphony pages - not for files in the filesystem. Leaving me with no other option than to add the route to the server config - which is something I really, really want to stop doing.

@michael-e
Copy link
Member

For instance, it is bad practice to request your styles with a querystring: style.css?v=204, incorporating it into the name is better: style-204.css. This is because some caching proxies will not cache the file when there is a query parameter present.

Now that is interesting. Thanks or pointing this out.

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

2 participants