Reputation: 949
I created a RSS feed using PHP. Basically using the header:
header("Content-Type: application/rss+xml; charset=ISO-8859-1");
And then creating the xml string and outputting it.
Now the problem is even when I make changes to the PHP script that outputs the RSS feed, it takes forever for those changes to propogate and be seen in the RSS reader.
How do I overcome this problem ?
Upvotes: 0
Views: 318
Reputation: 389
You could try using HTTP cache directives.
I'd suggest using this for testing:
Cache-Control: no-cache
And this for production:
Cache-Control: max-age=1800
It will make the content expire every 30 minutes (1800 = 30*60).
Tip: Do not create the XML as a string. Use the DomDocument API to create the XML and it will be ALWAYS right. No strange encoding and stuff like that.
Upvotes: 1