Home > Not Working > Expiresbytype Javascript Not Working

Expiresbytype Javascript Not Working


Stupid question, but I'm not home right now to check. or configure everything in native configuration? With the above 2 testing i got the below conclusion.If we access an old last modified file for the first time, Heuristic expiration policies set a expire time by deafult.After that Thank you for your help I will follow up as you suggest. Source

In the code below, the file types are listed in a row like jpg|jpeg|png|gif|js|css|swf|ico|woff|mp3. It may be possible to pull the resources periodically and store them on your server, but it is almost like a reverse cdn setup, and can cause other problems. Thanks again, JF Reply Kumar n/a Points 2015-03-30 3:31 am I have been tryint to enable Expire headers from my .htaccess, but it is not enabled, I have been add several more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Expiresbytype Javascript Not Working

Also, as another test, what happens if you try formatting the htaccess in a different way: ... Yes, I'm sure. Then i modifed again and accessed, this time it worked, I can able to see the modified content. Code: ExpiresActive On ExpiresByType application/x-javascript A1209600 ExpiresByType text/javascript A1209600 ExpiresByType application/javascript A1209600 ExpiresByType text/css A1209600 ExpiresByType image/x-icon A2592000 ExpiresByType image/icon A2592000 ExpiresByType application/x-ico A2592000 ExpiresByType application/ico A2592000 ExpiresByType image/gif

This shouldn't be an issue but definitely better stick to the convention. CSS, HTML and JavaScript's typically are updated more when developing a site than the sites images. Sign up today! Leverage Browser Caching Js Reply JacobIMH Staff 9,968 Points 2014-08-01 4:36 pm Hello Mike, and thanks for your comment.

Some CMS systems create these files on demand. If you don't set your Cache-Control for the HTTP headers, then, you will have a longer wait times when visiting your website. Polyglot Anagrams Cops' Thread Teenage daughter refusing to go to school Why is (a % 256) different than (a & 0xFF)? https://httpd.apache.org/docs/current/mod/mod_expires.html if you take a close look at the specific items I included in my query, they come from StatCounter, googleAnalytics and ShareThis -- I don't believe you can relocate any of

ExpiresByType image/jpg "access plus 60 days"), you can also base it on the modification date of a file (please note that this works only for real files that are stored on Apache Filesmatch On this page Make Browsers Cache Static Files With mod_expires On Apache2 (Debian Squeeze) 1 Preliminary Note 2 Enabling mod_expires 3 Configuring mod_expires 4 Testing 5 Links Make Browsers Cache Static I was wondering why it still showed a 30 day expiration when I had set it to something else, but then noticed caching software on the site had added ExpiresByType and They discuss the same problem and have possible solutions for you.

Enable Mod_expires

All I've really done is just add some code to the .htaccess file, "a2enmod expires" in my console, and that's about it. Share Twitter Facebook Google+ Hacker News Share your Question Your question has been posted! Expiresbytype Javascript Not Working Available Languages: en | fr | ja | ko CommentsNotice:This is not a Q&A section. Expiresactive On Htaccess Code: ExpiresActive On site is on subdomain i.e.

I'd mark this thread as Resolved. this contact form Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count). Shouldtext/htmlbe added to the code recommendations in this article? 2) Expires "Basic code"is not wrapped in I assume mod_expires.cis on by default on InMotion servers, so a check isnot needed If you really want to get them off of gtmetrix report, then remove the dependencies from your website. Expiration Not Specified For Js

Thanks for the answer.In my .htaccess file currently this:AddType application/x-httpd-php .php .htm .html Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^www.artchern.com$ [NC] RewriteRule ^(.*)$ http://artchern.com/$1 [R=301,L] RewriteRule ^news_([a-z_0-9]+).html$ news.html?id_news=$1 [L] have a peek here asked 4 years ago viewed 8039 times active 9 months ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Related 0yslow still not giving me an A for expires header

Then you have control over the files, and caching, etc. Add Expires Headers mod_deflate is now working, but I am having issues with mod_expires so here is what I have done: enable expires module and restart the server a2enmod expires service apache2 restart create US Election results 2016: What went wrong with prediction models?

Titus Hey, just ran across this article.

Get web hosting from a company that is here to help. These HTTP headers are an instruction to the client about the document's validity and persistence. HTTP request sent, awaiting response... Defer Parsing Of Javascript years months weeks days hours minutes seconds Basic syntax for ExpiresByType intervals The following shows the basic syntax for the ExpiresByType.

Welsa Chy hi Simon,i followed all your instructions put its not working for me:(…i posted a question on this link: http://stackoverflow.com/questions/5401180/error-log-saying-htaccess-expiresactive-not-allowed-here-but-allowoverride-non please have a look for more details Welsa Chy hi Browse other questions tagged .htaccess http-headers apache-2.2 or ask your own question. Reply John-Paul Staff 25,852 Points 2014-07-24 10:35 am Hello PaulAlford, Thank you for your question. Check This Out You’ll want to compress all text, which includes HTML, CSS, JavaScript, XML, JSON, etc.

i checked my error log..and it kept saying that "ExpiresActive not allowed here" or "ExpiresDefault not allowed here"….This is most strange since i changed "AllowOverride None" to "AllowOverride All" in my Although 0 seconds may be more for development than production. The Set-Cookie: PHPSESSID part is simply PHP setting a cookie for the session of a user. Check if you have any mod_expires directives (ExpiresByType or ExpiresDefault) elsewhere that are overriding apache.conf.

JF Reply John-Paul Staff 25,852 Points 2014-12-20 12:43 pm Hello JF, Thank you for contacting us. ExpiresByType text/html "access plus 2 days 12 hours" ExpiresByType image/png "access plus 6 months 3 days" Recommended Expire date ranges You do not want to set your expire times for your Putting in mod expires is typically done for assets that are loaded into the server and then cached into the browser.