Comments (7)
Are you using the 'setExpires' option in serve()?
When using 'setExpires', Last-Modified and the check for If-Modified-Since are
not
needed. After the Expires header is sent, under normal browsing the browser
will not
re-request the file at all until the expiration time.
Only when you explicitly request the JS/CSS URL or refresh the HTML page will
the
browser re-request the file, and when it does it will not send a conditional
GET, so
Last-Modified would be a waste.
You can verify this using Fiddler and navigating around on http://
www.miamianimalremoval.com/ (uses 'setExpires'). The /min/ URLs are not
re-requested
unless you manually refresh a page, and when you do, IE7 sends Pragma:
no-cache, so
it wouldn't send an If-Modified-Since header anyway.
If you want conditional GETs and 304 responses, don't use the 'setExpires'
option.
Original comment by [email protected]
on 17 Jul 2008 at 6:06
- Changed state: NeedInfo
from minify.
After further testing and reading the code I realized this was probably the
issue.
Still, I'm not sure I agree with your statement that on refreshing the page the
browser won't do a conditional get. In my FF2 and IE7 browsers I can see the
If-Modified-Since headers being sent for image requests that had a Last-Modified
header on a previous request. It seems even if there is even partial support
for
this in browsers having the Last-Modified in there could save some round-trips
with
no adverse affects.
In either case, that would be in the realm of a feature request so I assume you
can
just close out this erroneous bug report. Thanks and sorry for the confusion.
Original comment by [email protected]
on 17 Jul 2008 at 6:23
from minify.
So the requested feature would be: When 'setExpires' is used, Minify should
still
support conditional GETs?
My reasoning for not supporting conditional GET in this case is that it speeds
up
Minify by not loading ConditionalGet.php at all (in 2.0.2b).
My intuition is that, when far-off Expires headers are used, conditional GET
requests are pretty rare, but I guess some testing is in order. If you have
pages
that invite refresh-a-thons (eBay bidding) and conditional GETs are sent,
there'd be
a lot of opportunity for bandwidth savings.
Original comment by [email protected]
on 17 Jul 2008 at 9:00
from minify.
Exactly. I'm also wondering about pages with a meta-refresh (not sure what the
behavior is here but I'd bet it acts like a manual refresh) or AJAX-refreshed
pages,
which are more and more common.
Original comment by [email protected]
on 17 Jul 2008 at 9:23
from minify.
[deleted comment]
from minify.
Created feature request:
http://code.google.com/p/minify/issues/detail?id=37
Invalidating this issue.
Original comment by [email protected]
on 17 Jul 2008 at 11:09
from minify.
I don't know why I made a separate issue for this.
Original comment by [email protected]
on 27 Nov 2008 at 3:45
- Changed state: Verified
from minify.
Related Issues (20)
- Rewrite and version problem
- does not fully optimize HOT 1
- Connection was reset when trying to minify bootstrap CSS
- i have aproblem with test_Minify_CSS.php HOT 1
- Minify does not run on IIS
- Minify is not using the full potential of Minification. HOT 2
- Minify ignores no-cache header sent form the client HOT 8
- Firefox - transition delay must be given with units even if it is 0s HOT 3
- Debug=true causing javascript file to load commented
- maxAge is not set to 365 days when query-string ends with number HOT 1
- So Many Errors HOT 1
- <cite> tag handled as a block tag and not as an inline tag as it should HOT 2
- Patch for /min/config.php HOT 1
- [deleted issue]
- Minifying method calls on bare Numbers fails HOT 2
- NetworkError: 500 Internal Server Error HOT 2
- please provide the cli minifier as a phar archive
- $_SERVER['DOCUMENT_ROOT'] for file path is unreliable
- How to use this minify inside another script package? eg myBB?
- PHP Warning: fclose()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minify.