Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

"Leverage browser caching" on windows shared hosting

Options
  • 20-04-2012 1:29am
    #1
    Moderators, Category Moderators, Entertainment Moderators, Sports Moderators Posts: 22,584 CMod ✭✭✭✭


    Can it be done?

    Google SEO gave me an F over this but anything I've found on the interweb to fix it involves either .htaccess which is only for .php sites (it's a basic html site) or having direct access to the IIS setup, neither of which are available for simple shared hosting.

    Any suggestions, I'm lost here? :)


Comments

  • Registered Users Posts: 26,572 ✭✭✭✭Creamy Goodness


    Not a huge iis nut but iis web config is the equivalent to .htaccess I thinks.


  • Closed Accounts Posts: 14 elasticspastic


    Is there somewhere you can pop your site address into and google will grade various facets of your website, can you link to it if this is the case? Sounds interesting; had a quick google for it but I couldn't find anything.


  • Moderators, Category Moderators, Entertainment Moderators, Sports Moderators Posts: 22,584 CMod ✭✭✭✭Steve


    Is there somewhere you can pop your site address into and google will grade various facets of your website, can you link to it if this is the case? Sounds interesting; had a quick google for it but I couldn't find anything.
    If you use Chrome then its all built in - hit F12 and use the audits tab for SEO / web optimisation and the network tab for component load times.

    Alternatively, plug your URL into a third party analyser like http://gtmetrix.com/


  • Moderators, Category Moderators, Entertainment Moderators, Sports Moderators Posts: 22,584 CMod ✭✭✭✭Steve


    Not a huge iis nut but iis web config is the equivalent to .htaccess I thinks.

    Don't think I've access to that - I'll talk to the host, cheers.


  • Registered Users Posts: 26,572 ✭✭✭✭Creamy Goodness


    Is there somewhere you can pop your site address into and google will grade various facets of your website, can you link to it if this is the case? Sounds interesting; had a quick google for it but I couldn't find anything.
    https://developers.google.com/pagespeed/


  • Advertisement
  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Can't you set caching/expiry in your HTML headers, is that not what it's referring to?

    edit: though I guess that wouldn't apply to resources like images etc which is probably what you're having the issue with.


  • Moderators, Category Moderators, Entertainment Moderators, Sports Moderators Posts: 22,584 CMod ✭✭✭✭Steve


    Well the short answer is this can't be done on a shared hosting system as it would apply to all sites on the host. Only option is to upgrade to a VPS which costs more but gives full IIS control.
    stevenmu wrote: »
    Can't you set caching/expiry in your HTML headers, is that not what it's referring to?

    edit: though I guess that wouldn't apply to resources like images etc which is probably what you're having the issue with.
    Yeah but this is controlled by the IIS, not the content. Access to the IIS setup can't happen as explained above.

    From what I've found, it *can* be done in HTML by adding something like:
    <meta http-equiv="expires" content="mon, 27 sep 2012 14:30:00 GMT">
    but this *must* refer to a fixed date so it would mean periodically updating the html on every page, not really a good solution for a static site.


  • Registered Users Posts: 5,246 ✭✭✭conor.hogan.2


    Couldn't you use PHP (or whatever) to dynamically generate that html so you would not have to add it manually ever week or month?


  • Moderators, Category Moderators, Entertainment Moderators, Sports Moderators Posts: 22,584 CMod ✭✭✭✭Steve


    Couldn't you use PHP (or whatever) to dynamically generate that html so you would not have to add it manually ever week or month?
    If the site was PHP based then it can be done via the .htaccess file(s) - problem is I know zip about writing PHP and the site is purely html and javascript.

    You've given me an idea though, I wonder if I could use JS to write this into the dom as it loads?

    I has a new project for Monday! :D


  • Moderators, Category Moderators, Entertainment Moderators, Sports Moderators Posts: 22,584 CMod ✭✭✭✭Steve


    myPHP is available but I wouldn't know where to start with it. I could convert it all to asp.net (which I'd be more comfortable with coding) and use the web.config files to set the headers but it'd be a lot of work just to fix this issue - site has about 50 pages.

    Edit oops, where'd your post go?? :D


  • Advertisement
  • Registered Users Posts: 5,246 ✭✭✭conor.hogan.2


    Ye, I would do it in some server side language it is easier to do there and makes more sense to be done there.


Advertisement