What Is Page Zero
Every APEX application has a special page called the Global Page (Page 0). Content placed on this page, including regions, items, buttons, computations, and Dynamic Actions, is rendered on every page in the application unless explicitly excluded. Think of it as a master template that gets merged with each individual page at runtime.
Good Uses for the Global Page
The Global Page is ideal for elements that genuinely need to appear everywhere. Application wide notification banners that alert users to maintenance windows or system announcements. A hidden region containing items used by global computations, such as user preferences or role flags loaded once per session. JavaScript code that initializes application wide behaviors, like a custom keyboard shortcut handler or global error formatting. A footer region displaying version numbers or support contact information.
-- Example: Load user preferences into global page items on every page load
-- Global Page Before Header process:
BEGIN
SELECT pref_theme, pref_lang, pref_page_size
INTO :G_THEME, :G_LANG, :G_PAGE_SIZE
FROM user_preferences
WHERE username = :APP_USER;
EXCEPTION
WHEN NO_DATA_FOUND THEN
:G_THEME := 'DEFAULT';
:G_LANG := 'EN';
:G_PAGE_SIZE := 50;
END;
When NOT to Use the Global Page
The Global Page is not a dumping ground. Every region, item, and process on Page 0 executes on every page load. Adding heavy computations, complex queries, or numerous Dynamic Actions to the Global Page will slow down every page in your application. If a region or behavior only applies to a handful of pages, put it on those pages directly or use a condition to limit when it renders.
Avoid placing visible regions on the Global Page unless they truly need to appear everywhere. A common mistake is putting a notification banner on Page 0 and then spending time adding conditions to hide it on specific pages. If it needs conditions to NOT show on many pages, it probably does not belong on the Global Page.
Server Side Conditions for Global Page Components
When you do place components on the Global Page that should not appear everywhere, use Server Side Conditions to control rendering. The most common condition types are Page Is Not In List (to exclude specific pages) and PL/SQL Expression (for dynamic conditions). Remember that the condition is evaluated on every page load, so keep it lightweight, such as a simple page number check or a session state comparison rather than a database query.