• Home
  • WordPress
  • web Hosting
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • page Speed
  • Deals
  • Services
  • About

RAaz Kumar .com

wordpress tutorials seo hosting etc


what is If-Modified-Since HTTP header how to add to WordPress website

what is If-Modified-Since HTTP header?

it’s HTTP header request to google bot. if your server support
If-Modified-Since HTTP header it’s shows last modified content to Google bot. and googlebot can download this and quick index your website get in search results very quickly.
blogger platform supports this. some of web hosting companies may not supports. if your website not support HTTP header modified since then ask your web host providers.
when you choosing a right web host company worth to ask If-Modified-Since HTTP header supports or not.
you don’t need to worry about this unless you have thousand of webpages and updates daily.

 How add If-Modified-Since HTTP header through php

By Default will be added by server configuration . if not you can try below php method.

you can do this by adding below code header("Last-Modified: " . the_modified_date());to wp-config.php at the end of it before ?>.
or before /* That’s all, stop editing! Happy blogging. */

This also not working as error says “Fatal error: Call to undefined function the_modified_date() “

 

Add If modified last modified using plugins ft w3 total cache.

Just Install w3 total cache plugin, if you are in managed WordPress hosting, you have to look for alternatives.

1.Add Headers
Adds the ETag, Last-Modified, Expires and Cache-Control headers to HTTP responses generated by WordPress to facilitate caching.
this plugin working to enable if  modified since for WordPress

https://wordpress.org/plugins/header-last-modified/
2.  Last Modified

Adds post last modified to HTTP header to enable squid or cdn to cache your wordpress web page. Squid will not cache the page without http header field.

 it works on posts only not for the homepage.

3. I prefer second plugin because 1st plugin have more functions may be it can vulnerability with w3 total cache plugin .

4. If Modified Since HTTP Header

A simple plugin to sent “304 If Modified Since HTTP Header” to the web crawlers, so that they only fetch your site when something updated.

https://wordpress.org/plugins/if-modified-since-header/
NOT WORKING on the home page.
also try edit wp-config.php
add below code at the end config php before it closes before ?>
("Last-Modified: " . the_modified_date());

also follow this thread on stackoverflow.

Enabling  If-Modified-Since HTTP header by .htaccess  Apache server

 

# enable expirations
ExpiresActive On
# expire GIF images after a month in the client’s cache
ExpiresByType image/gif A2592000
# HTML documents are good for a week from the
# time they were changed
ExpiresByType text/html M604800

Enable if modified since on nginx seer

by defaults its off

if_modifeid_since exact;

context location http, server or location block.

for static files series from local disk it reruns etag last modified and if modified since.

but other content like dynamically generate html in wordpress through fastcgi it should be sep

proxy header or when using nginx as reverse proxy for apache.

we can

add_header if_modifeid_since $upstream_status.

 

Why if modified since important for SEO?

 

this header popular when google suggests and the feedthebot website recommended it. but how its useful.

it only stops from googlebot crawling & fetching unnecessarily. like browser before downloading a file it checks through etags

then server returns with 304-not modified, then googlebot ok then it’s not necessary download the page for caching purpose.

 

where to check If-Modified-Since HTTP header supports or not?

curl with request headers
step 1
curl online tool
curl -I https://raazkumar.com/files.css  (html/js etc)
ETag: “57d40685-400”
step 2:
curl -I -H ‘If-None-Match: “57d40685-400″‘ http://localhost/test.html
curl -I -H “If-Modified-Since: Wed, 29 Nov 2017 14:27:08” https://example.com
also here
check here google webmasters guidelines.pdf

304 & GZIP browser returning 304 after gzip off

if-modified-since = last-modified (the file has never been changed)
if-none-match = Etag (again, the files has never been changed)
304, or 200 OK,

gzip & Etag:

gzip off 304

gzip on etag off 304

gzip & etag on; 200
mod_deflate it’s as simple as adding the encoding to the already computed ETag.

Apache 2.5
DeflateAlterETag AddSuffix|NoChange|Remove

Content-Encoding: gzip
Transfer-Encoding: chunked
Vary: Accept-Encoding

Content-Length: 5292
Expires
Last-Modified

resources

https://discussion.dreamhost.com/thread-6497.html

http://webmasters.stackexchange.com/questions/19189/support-of-if-modified-since-http-header
https://support.google.com/webmasters/answer/35769#1

Related topics:

  1. enable browser caching in wordpress apache nginx caching headers explained
  2. Cache control Header & expires headers How to set Properly
  3. how to enable KeepAlive connections in apache nginx wordpress
  4. facebook page like button on website Popup & sidebar
  5. Connecting Domain to Website Blogger / WordPress etc

tutorials

  • Vivek Bindra Videos Transcription (business strategy)
  • git commands
  • new relic php agent install in 3 steps
  • new relic mysql install integration - 2 ways fix problems
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • Devops course Syllabus topics PDF AWS, Azure, cisco, redhat
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
  • apache server tutorial (install,config, performance tuning, security, error handling)
    • what is If-Modified-Since HTTP header how to add to Wordpress website
    • htaccess tutorial tips for wordpress #redirect #leverage browser cache #Gzip #KeepAlive
    • apache modules list (explained, enable disable)
    • connect to server by SSH client Putty SFTP client winscp LAMP, LEMP nginx apache etc linux
    • Lamp stack install on Ubuntu 20.4 LTS apache, mysql, php 7.4(Debian 9 & Ubuntu 18.04 lts)
    • apache performance tuning mpm-worker vs prefork vs event modules
    • enable caching in apache server (mod cache disk cache) vs fastcgi cache
    • how to enable KeepAlive connections in apache nginx wordpress
    • Cache control Header & expires headers How to set Properly
    • apache2 conf sample explained apache configuration file modules etc
    • restart apache in ubuntu (start | stop | reload | config test) centos debian mac linux windows 10 xampp
    • uninstall apache2 ubuntu in 3 steps Debian

 

 

wordpress Pagespeed optimization

Digitalocean free $100 Credit

Cloudways Review pricing promo codes

Siteground cpu limits Pricing

Shared Hosting

Managed wordpress Hosting

Managed Hosting Cloud server

VPS Hosting

Cloud Hosting – Unmanaged

Google cloud Pricing

Aws Pricing

Azure pricing

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

LEMP Install Ubuntu

Mysql Performance Tuning

Nginx Performance tuning

Linux Performance tuning

Php -fpm performance tuning

Redis Performance tuning

linux server security

nginx security best practices

wordpress security plugins

 

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2022 - All Rights Reserved Disclaimer & Privacy Policy