Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


timmmay

20580 posts

Uber Geek

Trusted
Lifetime subscriber

#154038 16-Oct-2014 10:22
Send private message

I use the Photocrati theme on some of my websites. For each gallery on a page it makes calls like this

http://www.website.com/index.php?display_gallery_iframe&gal_id=959_1&gal_type=2&gal_cap=OFF&gal_page=true&page_template=false&bg=FFFFFF

These galleries practically never change, but the following headers prevent caching by the browser or my CDN, both of which could give the site a significant speed-up.

Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

I could probably dive down into the theme code and work it out, but at the next theme update it'll just overwrite the changes. Is there any way to remove these headers other than that? Say a Wordpress plugin, htaccess changes, etc. I've tried mod_expires and ExpiresByType with a text/html content type (which is what the headers say the content type is) but it can't change the headers. If I was in a corporate environment I could change the code or rewrite the headers on an F5 like device - though that can affect performance.

My websites are hosted on a shared server. I can change the php, the .htaccess, but not the apache config.

Create new topic
mattwnz
20156 posts

Uber Geek


  #1155998 16-Oct-2014 11:33
Send private message

If you setup a child theme, your template changes shouldn't change when updating the parent theme.



timmmay

20580 posts

Uber Geek

Trusted
Lifetime subscriber

  #1156016 16-Oct-2014 11:47
Send private message

True, but I can't really be bothered editing all the code, and I'd like to take advantage of advances.

I've tweaked WP Super Cache to cache the contents of those files. The browser will still fetch them from the server each time, but at least they're gzip'd and sitting already prepared on the server, so there's no page generation time.

jarledb
Webhead
3257 posts

Uber Geek

Moderator
ID Verified
Trusted
Lifetime subscriber

  #1156140 16-Oct-2014 14:44
Send private message

You know you can set up a child theme and only add the files you want to change to it? Rest of it will be taken from the main theme.

You should be able to change the http headers in WordPress. Check out: http://wordpress.stackexchange.com/questions/20192/wp-function-filter-for-modifying-http-headers




Jarle Dahl Bergersen | Referral Links: Want $50 off when you join Octopus Energy? Use this referral code
Are you happy with what you get from Geekzone? Please consider supporting us by making a donation or subscribing.




mattwnz
20156 posts

Uber Geek


  #1156153 16-Oct-2014 14:47
Send private message

jarledb: You know you can set up a child theme and only add the files you want to change to it? Rest of it will be taken from the main theme.

You should be able to change the http headers in WordPress. Check out: http://wordpress.stackexchange.com/questions/20192/wp-function-filter-for-modifying-http-headers


Although if you are using a third party theme that you buy, sometimes they aren't setup properly to use child themes. Although most modern ones should be, at least ones released in the last year or two.

timmmay

20580 posts

Uber Geek

Trusted
Lifetime subscriber

  #1156159 16-Oct-2014 14:51
Send private message

Ok, I could look into a child theme. It's a very highly customised theme, modern but complex. I'd rather not go that way, too much work.

Looks like if I wanted to write code I could write my own plugin to modify the headers... hoping for an easier way - but I doubt I'll find anything super simple.

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.