function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Image not displaying on VF Page

Hello -

Not sure if this is more a VF question or question. I am creating a VF page to use as my "Sites" home page and I am having difficulty getting my logo/banner image to display in my "header". I saved it as a static resource (topborder1.jpg) but it still does not display, snippet of code always any help is appreciated...many thanks.




<apex:page showHeader="false" standardStylesheets="false" cache="true" expires="10800">
    <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
    <title>PPM Technologies</title>
    <apex:stylesheet value="{!$Resource.atest1}"/>

<div id="container">
    <div id="header"><apex:image url="{!$Resource.topborder1}"></apex:image></div>

            <div id="mainnav">
            <li><a href="#">Home</a></li>
            <li><a href="#">Locations</a></li>


make sure the cache control is set to public on the static resource. 


I actually see the image now, but I do have another question - why does it take so long to view any changes

to text, images or content. I modify my VF page and save it - then go to my site but dont see the changes.


Pages in production are cached on a CDN. This improves page performance for users accessing the site. I believe the default cache time is 10 minutes but this can be changed with the expires page attribute. You can also disable caching all together but this will make your site usage metrics go up faster.