Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help adding Expires headers

Featured Replies

Hello everybody,

 

So basically I've ran my site through ySlow and it has informed me that I should add Expires headers to some of the elements on my page to help with the caching. The page is mainly static content currently hosted on an Apache2 server.

 

If it helps at all the site is here.

 

I'm not really sure how you alter the HTTP header information but from what I have read I should use mod_expires module of Apache2 to set the Expires header.

 

Has anyone had any experience in this who could tell me what steps I need to take to implement the changes. Any advice would be greatly appreciated.

 

Jonny

You could try this, it sets a week long expiry date:

 

<?php header("Expires: ".date("D, d M Y H:i:s", strtotime("+1 week"))." GMT"); ?>

 

It will need to be at the very top of your header code before any HTML/output to the page.

What about using the Meta Data 'expires' tag? or is this out of date now?

 

<META HTTP-EQUIV=Expires CONTENT="Thu, 29 Jun 2010 16:18:42 GMT">

  • Jo 90 locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.