Informations :
Dates
- Publish : : 2010
- Modification : Thursday 01 september 2011
- 931 views
Share :
Ajouter un cache navigateur sur vos pages
Script avec 5 lignes
001[php] 002# Cache ######### 003header('Cache-Control: max-age=300'); 004header('Pragma: cache, max-age=300, max-stale=600'); 005[/php]
Pas de cache navigateur à vos pages
Script avec 5 lignes
001[php] 002# No-cache 003header('Cache-control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); 004header('Pragma: no-cache'); 005[/php]
Charger un PDF à la volé
Script avec 8 lignes
001[php] 002// Vous voulez afficher un pdf 003header('Content-type: application/pdf'); 004// Il sera nommé downloaded.pdf 005header('Content-Disposition: attachment; filename="downloaded.pdf"'); 006// Le source du PDF original.pdf 007readfile('original.pdf'); 008[/php]