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
Mandy08Mandy08 

Image not displaying on VF Page

Hello -

Not sure if this is more a VF question or Sites.com 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 below.....as always any help is appreciated...many thanks.

 

Amanda

 

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

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

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

Anand@SAASAnand@SAAS

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

Mandy08Mandy08

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.

TehNrdTehNrd

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.