We have a large website whith 100's of thousands of products and I am trying to incorporate some http status code caching so that search engines do not try and scan the pages if they have not changed.
Usually you can do this be applying a 304 status code.
However I have a strange issue in that when I output the following in my controller it does not work. I get a blank white screen.
return response('Hello World', 304)
->header('Content-Type', 'text/html');
But when I use 404, 200 etc... It works.
return response('Hello World', 200)
->header('Content-Type', 'text/html');
It's probably something really simple that I am overlooking. Perhaps something to do with Apache... But I am unsure at this point.
I wonder if anyone could help.