How to disable caching with .htaccess?

 

Results 1 to 2 of 2
I want to disable page caching from google and other search engines using .htaccess. Does ...
  1. #1
    SeoQuest's Avatar
    SeoQuest is offline Junior Member
    Join Date
    Jun 2012
    Location
    Europe
    Posts
    128
    Thanks
    22
    Thanked 35 Times in 6 Posts

    Default How to disable caching with .htaccess?

    I want to disable page caching from google and other search engines using .htaccess. Does anyone know what code should i use in the .htaccess file to disable caching?




  2. #2
    TZ2011's Avatar
    TZ2011 is offline Power Member
    Join Date
    Jun 2011
    Location
    popupdevil.com
    Posts
    741
    Thanks
    751
    Thanked 746 Times in 266 Posts

    Default Re: How to disable caching with .htaccess?

    Code:
    <filesMatch "\.(html|htm|txt|js)$">
    FileETag None
    <ifModule mod_headers.c>
    Header unset ETag
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
    </ifModule>
    </filesMatch>
    Also if you want to gzip (compress) pages for faster loading, you can use this

    Code:
    <ifModule mod_deflate.c>
      <filesMatch "\.(css|js|x?html?|php)$">
        SetOutputFilter DEFLATE
      </filesMatch>
    </ifModule>
    Last edited by TZ2011; 12-25-2012 at 07:53 PM.

  3. The Following User Says Thank You to TZ2011 For This Useful Post:

    SeoQuest (12-26-2012)

Similar Threads

  1. FeedWordPress alternative with image caching?
    By Vyndariel in forum Blogging
    Replies: 0
    Last Post: 02-03-2012, 06:18 PM
  2. Caching Question...
    By kharm in forum Black Hat SEO
    Replies: 0
    Last Post: 11-29-2011, 12:03 AM
  3. Re-Caching Vs. Re-Ranking - Do You Know the Difference?
    By dingdong in forum White Hat SEO
    Replies: 2
    Last Post: 07-10-2011, 01:38 AM
  4. scrapebox slow poster, caching images?
    By semilar in forum Black Hat SEO
    Replies: 3
    Last Post: 01-26-2011, 07:53 PM
  5. [Help] Xrumer {#file= has a caching problem
    By deef in forum Black Hat SEO
    Replies: 2
    Last Post: 06-21-2009, 11:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




BlackHatWorld on Twitter BlackHatWorld on FaceBook


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98